Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

3dsmax: Use custom modifiers to hold instance members #4931

Merged
merged 86 commits into from
Jun 20, 2023

Conversation

antirotor
Copy link
Member

@antirotor antirotor commented May 3, 2023

Changelog Description

Moving logic to handle members of publishing instance from children/parent relationship on Container to tracking via custom attribute on modifier. This eliminates limitations where you couldn't have one node multiple times under one Container and because it stores those relationships as weak references, they are easily transferable even when original nodes are renamed.

Additional info

Because of this change, all publishing plugins were affected. Now there is a collector plugin getting all nodes referenced by instance node and storing them on instance.data["members"] for easy access. This is also changing type case to align it more with 3dsmax python API and few style changes.

Testing notes:

Publishing of all types should work as before. In particular the tyFlow publishing needs testing because there was some refactoring involved.

[cbID:OP-5754]

@antirotor antirotor added type: enhancement Enhancements to existing functionality host: 3dsmax Autodesk 3dsmax labels May 3, 2023
@antirotor antirotor self-assigned this May 3, 2023
@ynbot ynbot added the size/M Denotes a PR changes 500-999 lines, ignoring general files label May 3, 2023
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

@antirotor
Copy link
Member Author

For some reason Hound is heavily fighting with the walrus operator := so until I can figure that out, I've used # noqa there.

@moonyuet
Copy link
Member

moonyuet commented May 4, 2023

Removing instance errors out. Using the original removing instance code may resolve this as removing container node in modifier meaning unparenting the added objects from the container
image
I have some comment on the point cloud code, it will probably resolve the extractor errors

@moonyuet
Copy link
Member

moonyuet commented May 4, 2023

A question: should the creators also be refratored?

@LiborBatek
Copy link
Member

LiborBatek commented May 4, 2023

I have just started with testing this PR so Im creating list for testing different instances:

Test has been made for Publish / Load of

  • Model
  • Camera
  • Max Scene
  • Point Cache
  • Point Cloud
  • Render

@LiborBatek
Copy link
Member

LiborBatek commented May 4, 2023

Speaking of first tests I did for Model all works ok (publish of the asset and its later Loading via Asset Loader) but I have a question if desirable when loaded to the scene there is one more level hierarchy compared to when loaded old published asset (without the new implementation of modifiers) in my case Alembic Cache. See Outliner hierarchy for Teapot asset.

Maybe its not an issue and I can imagine this will occur for any other families/ instances too. Take it more like a note or food for thought.

image

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

@moonyuet
Copy link
Member

@antirotor i have updated the PR for removing instance through the OP Parameter, it should be working now. Also I edited the string for the new collector to ease the confusion from collect_render.py

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

@antirotor
Copy link
Member Author

It works! I've removed two debug prints, and when approved by @LiborBatek , we can finally merge it.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link
Member

@iLLiCiTiT iLLiCiTiT left a comment

Choose a reason for hiding this comment

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

Code looks ok. Didn't test it...

antirotor and others added 2 commits June 19, 2023 18:37
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com>
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attr...
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details

@antirotor antirotor merged commit d032dbb into develop Jun 20, 2023
@antirotor antirotor deleted the enhancement/3dsmax-use-custom-modifier-attributes branch June 20, 2023 08:24
@ynbot ynbot added this to the next-patch milestone Jun 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: 3dsmax Autodesk 3dsmax size/M Denotes a PR changes 500-999 lines, ignoring general files sponsored Client endorsed or requested type: enhancement Enhancements to existing functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants