Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maya: Allow more than three eggObjectTypes in a Maya model #1134

Closed

Conversation

darktohka
Copy link
Contributor

@darktohka darktohka commented Mar 31, 2021

Issue description

As of right now, a Maya group node can contain three egg object types: eggObjectTypes1, eggObjectTypes2 and eggObjectTypes3. 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 and eggObjectTypes3 for object type information, we will now check all attributes matching eggObjectTypes[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…

  • …I have familiarized myself with the CONTRIBUTING.md file
  • …this change follows the coding style and design patterns of the codebase
  • …I own the intellectual property rights to this code
  • …the intent of this change is clearly explained
  • …existing uses of the Panda3D API are not broken
  • …the changed code is adequately covered by the test suite, where possible.

Copy link
Member

@rdb rdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good.

@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #1134 (4cacaf3) into master (51b6a90) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1134   +/-   ##
=======================================
  Coverage   16.08%   16.08%           
=======================================
  Files        3728     3728           
  Lines      360298   360298           
=======================================
+ Hits        57965    57967    +2     
+ Misses     302333   302331    -2     
Impacted Files Coverage Δ
panda/src/pgraph/lightAttrib.cxx 31.92% <0.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51b6a90...4cacaf3. Read the comment docs.

@darktohka darktohka force-pushed the feature/multiple-object-types branch from a75b18a to 4cacaf3 Compare March 31, 2021 17:28
@rdb rdb added this to the 1.10.10 milestone Mar 31, 2021
@rdb rdb closed this in 73a2d29 Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants