(self, command, motoin_link)
| 689 | # OUTPUT_IS_LIST = (False,) |
| 690 | |
| 691 | def parsing_command(self, command, motoin_link): |
| 692 | command.replace(' ', '') |
| 693 | # if command == '': return |
| 694 | lines = command.split('\n') |
| 695 | |
| 696 | cmd_list = [] |
| 697 | |
| 698 | total_length = 0 |
| 699 | |
| 700 | i = 0 |
| 701 | #old_es = None |
| 702 | for line in lines: |
| 703 | i += 1 |
| 704 | if line == '': continue |
| 705 | try: |
| 706 | cmds = line.split('=') |
| 707 | idx = int(cmds[0]) |
| 708 | if idx == 0: es = ExpressionSet() |
| 709 | else: es = ExpressionSet(es = motoin_link[idx]) |
| 710 | cmds = cmds[1].split(':') |
| 711 | change = int(cmds[0]) |
| 712 | keep = int(cmds[1]) |
| 713 | except: |
| 714 | assert False, f"(AdvancedLivePortrait) Command Err Line {i}: {line}" |
| 715 | |
| 716 | |
| 717 | return None, None |
| 718 | |
| 719 | total_length += change + keep |
| 720 | es.div(change) |
| 721 | cmd_list.append(Command(es, change, keep)) |
| 722 | |
| 723 | return cmd_list, total_length |
| 724 | |
| 725 | |
| 726 | def run(self, retargeting_eyes, retargeting_mouth, turn_on, tracking_src_vid, animate_without_vid, command, crop_factor, |
no test coverage detected