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

Registration #8

Merged
merged 54 commits into from
Mar 10, 2018
Merged

Registration #8

merged 54 commits into from
Mar 10, 2018

Conversation

AndresMWeber
Copy link
Owner

Registration is working finally and now we just need to get all sub_rig_templates in line with the new registration techniques.

Simplified API calls and removed a lot of logging
Added untested AbstractGrouping.insert_transform_buffer as a way to insert a buffer node from the context of a Grouping.
Made the API property a true dictionary and allowed for APIs to be accessible along with the new APIProxy.DEFAULT_API property.

Added fileop function to dcc.scene.
Completely removed digit as it makes more sense to add as a method than a class.
Added test suite for Hand but haven't filled it in.
Added layout joints to the Hand rig and changed from the weirdly added kwarg finger_joints which was unnecessary.

Worked more on get_finger_base_names as that function wasn't great so current functionality is there with a test suite.
…igTemplate rather than SubRig and also shifted over build_ik from Hierarchy as that is not the responsibility of Hierarchy.

Added methods:
Transform.get_children - gets children of the DagNode.
SubRigTemplate.get_shape_list - fills out a list of shapes to match a length of joint chains.
Fixed the file import for the test hand file.
Fixed the file import for the test hand file.
…method instead of going direct to the dcc.

Made the error in Hierarchy._traverse_up_linear_tree more verbose for node filter.

Fixed build_blend_chain so it uses a duplicate flag and is more standardized.

Combined the two IK/FK chain results into one dict.

Added anvil.utils.scene.print_scene_tree.

Fixed up the implementation of TestBuildHand as errors in the Hand build process would error the entire test class which would screw up the tests.  So now worked it in as a setUp instead.  Also added the Hand test properties to the Base class.
Removed the fbx file.
Changed back to the class method.
…assuming full build from the start.

Added specific layout_joints kwarg popping so we can init from a serialized dict.
Added default shape dict in BipedFoot for easy control shape lookups
Changed the build order to reflect the proper foot control hierarchy
Added a BipedFoot.build_ik_toe so that we can do a traditional reverse ik via the has_ik property.
Also added an init kwarg/property so we can define the leg_ik in order to parent that to the correct control.
Honestly it might make more sense to subclass a leg class so we don't build two foot controls.
Refactored the test names and removed the word build as it was redundant.

Set up a persistent rig foot build TestCase to reduce rig recreation.
…to sensibly make it work. Will continue overwriting name_tokens via dict item assignment.
…ime directly!

Added MULT_DIV_TYPE to config.
Took the Ankle control build out of the build for loop...unnecessary and complicates things.
…rom the start if you don't set the flag...

Fixed the duplicate condition for Foot building and hopefully fixed the build_ik_toe chain builds.

Removed the toeEnd joint so retargetted all the test builds to the toe.

Added a foot with leg test skeleton file to test integration with a preexisting leg setup.
…ioning.

Removed a few log calls that were unnecessary.
Changed to import from for anvil functions to simplify calls.
Added Transform.reset_transform for ease.
Simplified unnecessary match_rotation/match_position
Starting to add functionality for BipedFoot.insert_pivot_buffer (insole/outside)
Completely changed TestBuildBipedFoot so we can run pre/post hooks on the build process, this helps run the test case where we have to create a leg IK to "merge" it to a preexisting leg rig.
…o anvil object.

Worked a bit more on buffer inserts...added logic for replacing the head.
Realized I swapped the collocation logic, need to fix the insert...currently it is not adding the children of the insert target to the new buffer.
Added back the anvil namespace to the module functions as it was causing a circular import.

Mapped anvil.factory to most of the node query functions on Transform.

on BipedFoot cast all inputs to anvil.factory and built out insert_pivot_buffer a bunch.
Added test case for bipedFoot + insole/outsole and added files to boot.
…derstanding.

Fixed the behavior of insert_buffer as well, however it might not be matching transform still, checking this out.

Added DagNode.delete that uses the dcc to delete the node reference.
Removed a log line from match_transform

Added custom errors and fixed the RuntimeError catching from APIProxy to be more verbose.

Added insole/outsole input to the test so we can properly test for it.
Added insert_node which is a more abstract form, this will allow for easier insertions.
…'t parent the inserted node to itself!

In transform added initialization kwargs t, r, s since I realized I only had reference_object in there...

Added all new tests for the insertion functions of HierarchyChain.
Fixed a ton of code smell from landscape.io check:
https://landscape.io/github/AndresMWeber/Anvil/102/
…rror if someone inputs a bad sub_rig_dict.

Fixed init to match the base class for BipedFoot as it was causing mis-fires on init from dict.

Fixed the naming issue on the test skeleton files (classic mirroring misnames ball->balr and heel->heer)
…relationships now.

Added class NodeRelation for the base class of relationship sets:
HierarchyChain (linearly parented node chain)
NonLinearSet(Non directly parented set of nodes that has a respected order.)

Added AbstractGrouping.generate_build_report to standardize build report dicts.
Added bunch to the requirements for easy dot notation access to the hierarchy.
Added AbstractGrouping.register_build_nodes to automatically consume a build_report and add to the AbstractGrouping().hierarchy.

Started to rework SubRigTemplate/BipedFoot's build methods to work with the new registration paradigms.
Removed MetaData.cls_merge_name_tokens_and_meta_data as it wasn't used anymore and also added a protect_all flag to automatically protect all initialized kwargs if the user wants.
…relationships now.

Added class NodeRelation for the base class of relationship sets:
HierarchyChain (linearly parented node chain)
NonLinearSet(Non directly parented set of nodes that has a respected order.)

Added AbstractGrouping.generate_build_report to standardize build report dicts.
Added bunch to the requirements for easy dot notation access to the hierarchy.
Added AbstractGrouping.register_build_nodes to automatically consume a build_report and add to the AbstractGrouping().hierarchy.

Started to rework SubRigTemplate/BipedFoot's build methods to work with the new registration paradigms.
Removed MetaData.cls_merge_name_tokens_and_meta_data as it wasn't used anymore and also added a protect_all flag to automatically protect all initialized kwargs if the user wants.
…general

Refactored the names of the classes to be more demonstrative.

Trying to refactor all simple functions to the base class and simplify the classes in general.

Added simple pre/post scene sanitization wrapper based on cleanup_nodes.  Might just build this into the test runner of the base class so I don't have to keep tagging.
Overrode the set property to LinearHierarchySet._traverse_up_linear_tree so it worked and fixed the __getitem__ function.
Pushed self.nodes assignment to base class NodeRelationshipSet.
Added abstract methods extend, append and insert.
… errors during printing/yaml load/dumping.

Converted generate_build_report to a wrapper.  This will usually be chained with register_built_nodes.
Removed insert_transform_buffer as it was a duplicate from NonLinearHierarchySet.

Starting to change the logic behind Control as it is acting a bit non sensically as it currently stands.

Modifying the main build process to match the new registration process.  Need to find a better plan than getting the last node created in the nodes list.

Refactored test_hierarchy_chain to test_relationships and added new tests for registration in test_abstract_grouping.

Fixed the wrapping functionality for pre_and_post_sanitize_scene with @functools.wraps.
# Conflicts:
#	anvil/grouping/__init__.py
#	anvil/grouping/base.py
#	anvil/grouping/relationships.py
#	anvil/grouping/rig.py
#	anvil/meta_data.py
#	anvil/sub_rig_templates/base.py
#	anvil/sub_rig_templates/biped_foot.py
#	tests/acceptance/test_biped.py
#	tests/test_relationships.py
…ontracts more sorted out in my head for this outlying class.

Simplified the get_tag lambda function and added REPORT_LOOKUP to easily sort incoming object types.
Might simplify the report as needing to access a dictionary key is a bit silly currently, but that's how it's implemented in Rig.
Added config.SET_TYPE
Removed bunch from requirements and added nose-exclude.
Refactored TestBase.delete_created_scene to TestBase.clean_up_scene and improved the wrapper implementation
Added generic.Map class which is a dot notation accessible subclass of dict.
Added generic.to_size_list to be able to match a list to a specific size (padding to right with [-1] index if needed.
Fixed up registration to use new Map class.

Added more documentation to generate_build_report.
Added AbstractGrouping.register_node to register already built nodes.

Added SET_TYPE, ANVIL_TYPE, and ID_TYPE
Vastly simplified the wrappers for sanitizing test scenes.
…tening the hierarchy Map instance.

Added anvil.grouping.AbstractGrouping._flatten_hierarchy() to follow up.

Fixed Control implementation and simplified build steps to be more legible.
Modified all build methods to classmethods, however this is breaking the SubRigTemplate builds as it is passing as a class and not an instance.  Need to figure this one out next.

Removed SubRigTemplate.get_shape_list since it was redundant to to_size_list which is much better and generalized.

Added MetaData.to_dict to stop pissing off kwargs linting.

Modified so many tests to get in line with new hierarchy registration.
Converted all build functions back to instance methods.  class methods proved unnecessary for now.
Refactored anvil.sub_rig_templates.base to base_sub_rig_templates.

Moved SubRigTemplate.get_shape_list tests to test against to_size_list in generic as well as added a test file for generic.
https://circleci.com/gh/AndresMWeber/Anvil/224

Minor mistakes like not pulling out the name tokens from kwargs when redefining or adding to.
Forgot to use _flat_hierarchy to pull all controls out easily to the top level for testing against.
Forgot to change dot notation access to the result dict to getitem access as it is raw and not yet a mapping.
Changed property implementation of NodeSet.ANVIL_TYPE
Refactored/moved all test resources to anvil/tests/resources.
…ngement.

Removed NodeHierarchySet.rename as it was pointless.
Reworked how the build functionality works in sub_rig_template.
Added is_aset to permit for the new Anvil base class.
…ed build call (so things get sorted properly to the hierarchy).

Removed is_class since it actually did not work.

Added testing to see if we are within CIRCLECI.
Simplified safe_delete.
Refactored cleanup_nodes to sanitize for brevity.

Removed a ton of functions from BaseTest as they are not in use anymore.

Added dict_deep_sort to convert a dictionary of dictionaries to a sorted nest of OrderedDict

Moved sanitize_scene to utils.scene.
…the function wrap. Added a kwargs.get to detect instead.

Safe delete has been turned into a catchall exception since I couldn't account effectively for MayaNodeError that pymel throws and assuming there would be other platform specific errors I don't want to account for.

Converted most iteritems that threw out the keys to itervalues as I just realized that existed...
…ll__ and non-use.

Fixed a bunch of code smell and warnings from https://landscape.io/github/AndresMWeber/Anvil/122

Starting to implement using skip_register.  Seeing how this performs in base_sub_rig_template and limb
Removed most logging calls.
…or else it would pass on to the decorated function as well.
…re out when to pop the flags properly.

Blend chain is erroring, not sure why yet.
Fixed repr for base class NodeSet

Fixed documentation for build_blend_chain to reflect limitations of Maya blendColors node.
Fixed implementation for build_blend_chain as the zipping was not working properly based on the simplified inputs from the build fk/ik functions
Fixed the way Limb passed fk/ik chains to build_blend_chain.
Added Choice node to config.
…_node.

Mid-fixing registration of nodes in the Hand rig build process.

Turned the flag detection into pop to avoid pushing kwargs etc in registration functions.
Added hierarchy_id flag for registration.
…ck the files in Maya so I don't have to restart Maya every time.
…an not rely on instance.root being set and can use arbitrary "top" nodes to parent a rig

Fixed the auto_save_results so that we are now properly saving out files that represent the state of the test case.  This will make testing MUCH easier and quicker.

Changed auto_save_results to read environment variables instead so that we can set env vars instead of rely on passing kwargs which is less easy to do with unittests.
@AndresMWeber AndresMWeber merged commit 4900320 into master Mar 10, 2018
@AndresMWeber AndresMWeber deleted the registration branch March 10, 2018 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant