Ejemplo n.º 1
0
#   1) ????
#   2) ????
#   3) ????
#
#=================================================================================================================================================

import maya.cmds as mc
from cgm.lib import search
from cgm.lib import attributes
from cgm.lib import dictionary
from cgm.lib import settings
from cgm.lib import lists
from cgm.lib import guiFactory

namesDictionaryFile = settings.getNamesDictionaryFile()
typesDictionaryFile = settings.getTypesDictionaryFile()
settingsDictionaryFile = settings.getSettingsDictionaryFile()

cgmNameTags = 'cgmName', 'cgmNameModifier', 'cgmPosition', 'cgmDirection', 'cgmDirectionModifier', 'cgmIterator', 'cgmType', 'cgmTypeModifier'


class NameFactory():
    """ 
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Assertions to verify:
    1) An object knows what it is

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    """
    def __init__(self, obj):
        ### input check
Ejemplo n.º 2
0
from zooPyMaya import apiExtensions

from cgm.lib import distance
from cgm.lib import dictionary
from cgm.lib import guiFactory
from cgm.lib import settings
from cgm.lib import search
from cgm.lib import attributes
from cgm.lib.classes import NameFactory
from cgm.lib import lists
from cgm.lib import nodes
from cgm.lib import rigging



typesDictionary = dictionary.initializeDictionary(settings.getTypesDictionaryFile())
settingsDictionary = dictionary.initializeDictionary( settings.getSettingsDictionaryFile())
settingsDictionaryFile = settings.getSettingsDictionaryFile()


def polyUniteGeo(objList,name='unitedGeo'):
    """
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    DESCRIPTION:
    Unites polys with the poly unite command. Every piece of geo must have
    a deformer node with an .outputGeometry

    ARGUMENTS:
    objList(string)
    name(string) - base name for the geo and node created
Ejemplo n.º 3
0
#   2) ????
#   3) ????
#   
#=================================================================================================================================================

import maya.cmds as mc
from cgm.lib import search
from cgm.lib import attributes
from cgm.lib import dictionary
from cgm.lib import settings
from cgm.lib import lists
from cgm.lib import guiFactory
from cgm.lib.classes.NameFactory import NameFactory

namesDictionaryFile = settings.getNamesDictionaryFile()
typesDictionaryFile = settings.getTypesDictionaryFile()
settingsDictionaryFile = settings.getSettingsDictionaryFile()

#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# Unique Name s
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
def createTempUniqueNames(objList):
    uniqueNames = []
    for obj in objList:
        nameBuffer = obj
        cnt = 77
        if '|' in list(obj):
            """ find a new one """
            while mc.objExists(nameBuffer) == True:
                nameBuffer = ('%s%s%i' % (obj,'_',cnt))
                cnt+=1
Ejemplo n.º 4
0
from cgm.lib import dictionary
from cgm.lib import settings
from cgm.lib import distance
from cgm.lib import search
from cgm.lib import lists
from cgm.lib import rigging
from cgm.lib import guiFactory

import copy
import random

reload(dictionary)
reload(lists)
reload(attributes)

typesDictionary = dictionary.initializeDictionary(settings.getTypesDictionaryFile())
settingsDictionary = dictionary.initializeDictionary( settings.getSettingsDictionaryFile())
settingsDictionaryFile = settings.getSettingsDictionaryFile()

def cgmTagToFloatAttr(obj,cgmTag,*a, **kw):
    """ 
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    DESCRIPTION:
    Lays out a seies of objects in column and row format

    ARGUMENTS:
    objectList(string)
    columnNumber(int) - number of columns
    
    RETURNS:
    Nada