Ejemplo n.º 1
0
    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.
"""
import maya.api.OpenMaya as Om
import pymel.core as pm
from maya import cmds as cmds
import re
from modules.setup_log import setup_logging

LOGGER = setup_logging(__name__)

maya_useNewAPI = True


def dag_path_iterator(traversal_type=Om.MItDag.kBreadthFirst,
                      filter_type=Om.MFn.kTransform):
    dag_iter = Om.MItDag(traversalType=traversal_type, filterType=filter_type)

    # Iterate DAG tree
    while not dag_iter.isDone():
        # Get current item
        __p = dag_iter.getPath()

        # Break on invalid item
        if dag_iter.currentItem().isNull():
Ejemplo n.º 2
0
def setup_aeffchen_log():
    global LOGGER
    setup_log_file(PFAD_AEFFCHEN_LOG_NAME, delete_existing_log_files=True)
    LOGGER = setup_logging('aeffchen_logger')