Beispiel #1
0
 def save_command():
     self.__command_list.add_command(
         command.PatchCommand({
             "name":
             name.get(),
             "position": (int(pos_x.get()), int(pos_y.get())),
             "thickness":
             float(thickness.get()),
             "color":
             (int(col_r.get()), int(col_g.get()), int(col_b.get())),
             "radius":
             float(radius.get()),
         }))
Beispiel #2
0
            def save_command():
                trans = list()
                for i in range(len(trans_vals)):
                    trans.append(float(trans_vals[i].get()))

                self.__command_list.add_command(
                    command.PatchCommand({
                        "name":
                        name.get(),
                        "skeleton":
                        model.get_skeleton(skeleton.get()),
                        "transitions":
                        trans,
                    }))
Beispiel #3
0
            def save_command():
                patch = [dict() for i in range(skeleton.number_of_bones)]

                for bone_name, p in positions.items():
                    patch[bone_name]["position"] = (int(p[0].get()),
                                                    int(p[1].get()))
                for bone_name, t in thickness.items():
                    patch[bone_name]["thickness"] = float(t.get())
                for bone_name, c in colors.items():
                    patch[bone_name]["color"] = (int(c[0].get()),
                                                 int(c[1].get()),
                                                 int(c[2].get()))
                for bone_name, r in radiuses.items():
                    patch[bone_name]["radius"] = float(r.get())
                for bone_name, l in lengthes.items():
                    patch[bone_name]["length"] = float(l.get())
                for bone_name, r in rotates.items():
                    patch[bone_name]["rotation"] = float(r.get())

                self.__command_list.add_command(command.PatchCommand(patch))
Beispiel #4
0
 def save_command():
     self.__command_list.add_command(
         command.PatchCommand({"name": name.get()}))