maya: Allow more than three eggObjectTypes in a Maya model #1134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue description
As of right now, a Maya group node can contain three egg object types:
eggObjectTypes1
,eggObjectTypes2
andeggObjectTypes3
. Some nodes may have more than three object types set. These are lost during the maya2egg conversion process.Solution description
Instead of checking
eggObjectTypes1
,eggObjectTypes2
andeggObjectTypes3
for object type information, we will now check all attributes matchingeggObjectTypes[1...inf]
. As soon as we find an egg object type that is not set in this fashion, we will stop looking for object types to add to the group. This approach is backwards compatible.The
eggObjectFlags.mel
Maya script has also been changed to allow more than 3 object types to be added.eggObjectFlags.mel
is responsible for adding one egg object type to a group node. Before this commit, it would print a warning if more than 3 object types are present, but now, it will find the first empty object type slot to insert an object type into, removing this 3 object type limitation.Checklist
I have done my best to ensure that…