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

Python API - Re-Design Collection Compiling #72

Closed
david-cattermole opened this issue Mar 28, 2019 · 1 comment
Closed

Python API - Re-Design Collection Compiling #72

david-cattermole opened this issue Mar 28, 2019 · 1 comment
Assignees
Labels
enhancement python api The Python API for mmSolver
Milestone

Comments

@david-cattermole
Copy link
Owner

Using the mmSolver.api functions we can compile a Collection into keyword arguments for the maya.cmds.mmSolver plugin command. The code to do this is currently ~1000 lines, and the logic is spread into both the mmSolver.tools.solver sub-package and mmSolver._api.collection module.

Now we have a better idea of how the solver should work, we should redesign and refactor this component. Ideally we should maintain backwards compatibility, but this is not critical.

Goals / Features:

  • Avoid needing to create multiple kwargs for each frame.
  • Try to use Python generators to "yield" kwargs, rather than pre-compile them.
  • Create a way to detect individual "chunks" of nodes; each chunk can be solved separately.
  • Validation should not require compiling every-single-kwarg. For example, we don't exactly care about the data, but instead the "connections".
  • Logic for early-exit of the solver process.
  • Logic for re-initializing the mmSolver command if a new minimum may be found (must have a limit of "re-attempts", must not loop forever).
  • Provide a system of user feedback for solver information (not just SolveResult classes); for example tell the user how many "errors vs parameters" are currently set up.

Related to issue #18 and #57.

@david-cattermole david-cattermole added enhancement python api The Python API for mmSolver labels Mar 28, 2019
@david-cattermole david-cattermole added this to the v0.3.0 milestone Mar 28, 2019
@david-cattermole david-cattermole self-assigned this Mar 28, 2019
david-cattermole added a commit that referenced this issue Aug 17, 2019
…lass.

Begin re-writing solver compile. Issue #72 and #57.
Collection Execution is a separate module.
david-cattermole added a commit that referenced this issue Aug 17, 2019
Added basic SolverStandard compile function. Issue #72.
Allow Actions to dynamically look up callable functions from function names (strings).
david-cattermole added a commit that referenced this issue Aug 18, 2019
Add simple attributes to SolverStandard class.
Add explicit 'compile' module, for compiling into Actions.
Solvers should return empty actions list if is not valid.
Do not compile twice each time a Collection is executed.
Collection now supports SolverBase derivatives.
Removed execute.collection_is_valid function.
Issue #72.
david-cattermole added a commit that referenced this issue Aug 24, 2019
Updated SolverStep test with Print Statistics.
Issue #72.
david-cattermole added a commit that referenced this issue Sep 7, 2019
Log a raised exception, rather than printing something else.
david-cattermole added a commit that referenced this issue Sep 7, 2019
Store the 'solver attr type' of the Attr object. Issue #72.
david-cattermole added a commit that referenced this issue Sep 7, 2019
david-cattermole added a commit that referenced this issue Sep 7, 2019
More options for root solver frames.
Using 'solver triangulate' Solver.
david-cattermole added a commit that referenced this issue Oct 2, 2019
…before solving, using a yield/generator pattern. Issue #72.

Added option to disable Viewport 2 while solving, on by default.
Fixed bug; 'auto block' solving uses individual attribute list, rather than all attributes.
Add solver compile cache to help speed up multi-frame solving.
Removed 'print stats' flags for SolverStep object, the new validation model no longer requires print stats.
@david-cattermole
Copy link
Owner Author

Commit 04a1e49 now completes this issue. The commit is now merged into the master branch. Any extra features will be covered by a newly created issue.

The new code supports faster validation as a part of the API, without needing to compute the Collection a second time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement python api The Python API for mmSolver
Projects
None yet
Development

No branches or pull requests

1 participant