Пример #1
0
def keyMulti(in_mousebutton, in_keymodifier, object_names, exclude=[]):

    # Right click - Do nothing
    if in_mousebutton == 2:
        return

    model = getModel()

    # Get objects
    for name in object_names:
        children = model.FindChildren(name)
        if children.Count:
            controlers.AddItems(children)

    # Remove objects
    # As we can yuse symbol such as '*' in the name list we might need to filter the result
    for name in exclude:
        if model.Name + "." + name in controlers.GetAsText().split(","):
            controlers.RemoveItems(model.Name + "." + name)

    if not controlers.Count:
        gear.log("Can't Find Controlers : " + ",".join(object_names),
                 sn.sev_siError)
        return

    ani.setKey(controlers)
Пример #2
0
def keyMulti(in_mousebutton, in_keymodifier, object_names, exclude=[]):

    # Right click - Do nothing
    if in_mousebutton == 2:
        return

    model = getModel()

    # Get objects
    for name in object_names:
        children = model.FindChildren(name)
        if children.Count:
            controlers.AddItems(children)

    # Remove objects
    # As we can yuse symbol such as '*' in the name list we might need to filter the result
    for name in exclude:
        if model.Name+"."+name in controlers.GetAsText().split(","):
            controlers.RemoveItems(model.Name+"."+name)

    if not controlers.Count:
        gear.log("Can't Find Controlers : "+",".join(object_names), gear.sev_siError)
        return

    ani.setKey(controlers)
Пример #3
0
def keySel(in_mousebutton, in_keymodifier):

    # Left and Middle click
    if in_mousebutton in [0, 1]:
        ani.setKey()

    # Right click - Do nothing
    elif in_mousebutton == 2:
        return
Пример #4
0
def keySel(in_mousebutton, in_keymodifier):

    # Left and Middle click
    if in_mousebutton in [0, 1]:
        ani.setKey()

    # Right click - Do nothing
    elif in_mousebutton == 2:
        return
Пример #5
0
def keyAll(in_mousebutton, in_keymodifier):

    controlers = getAllControlers()
    if not controlers.Count:
        gear.log("Nothing to key", gear.sev_warning)
        return

    # Left and Middle click
    if in_mousebutton in [0, 1]:
        ani.setKey(controlers)

    # Right click - Do nothing
    elif in_mousebutton == 2:
        return
Пример #6
0
def keyAll(in_mousebutton, in_keymodifier):

    controlers = getAllControlers()
    if not controlers.Count:
        gear.log("Nothing to key", gear.sev_warning)
        return

    # Left and Middle click
    if in_mousebutton in [0, 1]:
        ani.setKey(controlers)

    # Right click - Do nothing
    elif in_mousebutton == 2:
        return