rfm2  22.0
A python-based rewrite of RenderMan for Maya
 All Classes Namespaces Files Functions Variables Pages
rfm2.unit_tests.ut_rfm_json Namespace Reference

Classes

class  RfmJsonUpdater
 

Functions

def recursive_updater
 

Variables

dictionary CORE
 
dictionary USER
 

Function Documentation

def rfm2.unit_tests.ut_rfm_json.recursive_updater (   in_dict,
  out_dict 
)
Recursively update a out_dict with in_dict.

WARNING: if you change this code, update rfm/plugins/RenderMan_for_Maya.py.

- dicts are recursively updated, i.e.:
  - new val will replace old val for the same key.
  - new key will be added if it doesn't exist in that dict.
- lists are merged, i.e.:
    - new list is prepended to old list.
      merge ['c'] in ['a', 'b'] -> ['c', 'a', 'b']
    - duplicates are removed while preserving the original order:
      merge ['c', 'd'] in ['a', 'b', 'c'] -> ['c', 'd', 'a', 'b']

Args:
- in_dict (dict): what will be merged in out_dict.
- out_dict (dict): the final output.

Returns:
- a dict.

Variable Documentation

dictionary rfm2.unit_tests.ut_rfm_json.CORE
dictionary rfm2.unit_tests.ut_rfm_json.USER