PyApplyTex [c4d] v16
"""
Name-US: df_pyApplyTex_v0.1(v15) 12-03-2017
Description-US: Places textures on all objects in hierarchy baed on object->material matching names.
Author: David Flamholc, vfxvoodoo.com

"""

# pyApplyTex_version
pyApply = "df_pyApplyTex_v0.1(v15) 12-03-2017"

"""
LICENSE
-------
    Copyright (c) 2016, David Flamholc, VFXVoodoo.com
    Programming: David Flamholc <dflamholc@gmail.com>

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
    COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
    OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGE LOG
----------
    version: paApplyTex_v08
        - implemented UNDO functions

    version: paApplyTex_v09
        - implemented moving newly created tags to last in the stack

    version: paApplyTex_v10  -- (df_pyApplyTex_v0.1(v10) 12-03-2017)
        - refactoring of funcitons and variables
        - and FLOW comments
        - scrip header INFO and TO DO list added

# THE FLOW ######
    # in the MAIN function we call the recurseObjs function
    # recurseObjs iterates through the hierarchy and calls the checkName function on every object
    # checkName checks the objects name against the names in the material list and runs placeTags on matchin objects
    # gets the material matching the object name from the list of materials and sets the tags projection type,
    # then sets the material in the empty textag that was created, sets teh projection

KNOWN BUGS
------------------------
    - object that already have a non matching material on them will keep stacking new matching materials endlessly
    -

INSTRUCTIONS & DEV NOTES
------------------------
    - objects and materials need to have exactly the same name for this script to work