Beispiel #1
0
def empty_size(empty, size=1.0):
    """Set the scale of an empty object"""

    if not Is.empty(empty):
        return

    if hasattr(empty, 'empty_draw_size'):  # 2.7
        empty.empty_draw_size = size
    if hasattr(empty, 'empty_display_size'):  # 2.8
        empty.empty_display_size = size
Beispiel #2
0
def empty_type(empty, type='PLAIN_AXES'):
    """
    Set the visual shape of an empty object
    type = enum in
        ['PLAIN_AXES', 'ARROWS', 'SINGLE_ARROW',
        'CIRCLE', 'CUBE', 'SPHERE', 'CONE', 'IMAGE']
    """

    if not Is.empty(empty):
        return

    if hasattr(empty, 'empty_draw_type'):  # 2.7
        empty.empty_draw_type = type.upper()
    if hasattr(empty, 'empty_display_type'):  # 2.8
        empty.empty_display_type = type.upper()