Esempio n. 1
0
def thing_copy(thing, things):
    new_thing = {}
    for key in thing.keys():
        value = thing[key]
        if (key == "geometry"):
            new_thing["geometry"] = value
        elif (key == "children"):
            new_children = []
            for child in value:
                child_thing = things[child["name"]]
                new_child = thing_copy(child_thing, things)
                new_children.append(new_child)
            new_thing["children"] = new_children
        else:
            new_thing[key] = copy_object(value)
    return new_thing
Esempio n. 2
0
def thing_copy(thing, things):
    new_thing = {}
    for key in thing.keys():
            value = thing[key]
            if (key == "geometry"):
                        new_thing["geometry"] = value
            elif (key == "children"):
                        new_children = []
                        for child in value:
                                        child_thing = things[child["name"]]
                                        new_child = thing_copy(child_thing, things)
                                        new_children.append(new_child)
                        new_thing["children"] = new_children
            else:
                        new_thing[key] = copy_object(value)
    return new_thing
Esempio n. 3
0
def animation_task(animation, thing, now):
    active = {}
    active = copy_object(animation)
    active["time_start"] = now
    active["thing"] = thing
    return active
Esempio n. 4
0
def animation_task(animation, thing, now):
    active = {}
    active = copy_object(animation)
    active["time_start"] = now
    active["thing"] = thing
    return active