diff --git a/maxdiff/patch_printer.py b/maxdiff/patch_printer.py index a68fcb9..ceac85a 100644 --- a/maxdiff/patch_printer.py +++ b/maxdiff/patch_printer.py @@ -110,7 +110,7 @@ def print_patcher_summary_recursive( "maxclass", # used in box name "text", # shown in box name "id", # used only for lines - "patching_rect", # different every time + "patching_rect", # not relevant for patch diffing (event ordering is shown with "order" property") "numinlets", # cached from inlet objects "numoutlets", # cached from outlet objects "outlettype", # cached from outlet objects @@ -153,6 +153,10 @@ def print_patcher_summary_recursive( #### patch cords #### + skip_line_properties = [ + "midpoints", # not relevant for patch diffing (event ordering is captured with "order" property") + ] + if len(patcher["lines"]) == 0: return summary_string @@ -170,6 +174,8 @@ def print_patcher_summary_recursive( for key, val in line.items(): if key == "patchline": for key2, val2 in val.items(): + if key2 in skip_line_properties: + continue if key2 == "source": from_name = f"[{ids_to_names[val2[0]]}]" from_outlet = f"({val2[1]})" diff --git a/maxdiff/tests/test_baselines/FrozenTest.amxd.txt b/maxdiff/tests/test_baselines/FrozenTest.amxd.txt index 3b54a00..f9afad0 100644 --- a/maxdiff/tests/test_baselines/FrozenTest.amxd.txt +++ b/maxdiff/tests/test_baselines/FrozenTest.amxd.txt @@ -2,21 +2,21 @@ MIDI Effect Device ------------------- Device is frozen ----- Contents ----- -Test.amxd: 39511 bytes, modified at 2024/10/21 12:50:20 UTC <= Device +Test.amxd: 36528 bytes, modified at 2025/06/26 12:53:53 UTC <= Device ParamAbstraction.maxpat: 1570 bytes, modified at 2024/05/24 13:59:36 UTC, 2 instances -MyAbstraction.maxpat: 2015 bytes, modified at 2024/10/21 12:18:20 UTC, 6 instances +MyAbstraction.maxpat: 2015 bytes, modified at 2025/02/14 11:10:38 UTC, 6 instances AbstractionWithParameter.maxpat: 1569 bytes, modified at 2024/05/24 13:59:36 UTC, 2 instances hz-icon.svg: 484 bytes, modified at 2024/05/24 13:59:36 UTC, 3 instances beat-icon.svg: 533 bytes, modified at 2024/05/24 13:59:36 UTC, 3 instances fpic.png: 7094 bytes, modified at 2024/05/24 13:59:36 UTC, 5 instances -shakerkicksnare.aif: 352854 bytes, modified at 2024/10/21 12:21:12 UTC, 2 instances -VisibleBang.js: 317 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -my-maxnode-basic.js: 464 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -times3.gendsp: 2047 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -myxfade.genjit: 3156 bytes, modified at 2024/10/21 12:21:12 UTC, 2 instances -mystorage.json: 239 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -myTestTable: 410 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance -TestScript.js: 87 bytes, modified at 2024/10/21 12:21:12 UTC, 1 instance +shakerkicksnare.aif: 352854 bytes, modified at 2025/02/14 11:10:38 UTC, 2 instances +VisibleBang.js: 317 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +my-maxnode-basic.js: 464 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +times3.gendsp: 2047 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +myxfade.genjit: 3156 bytes, modified at 2025/02/14 11:10:38 UTC, 2 instances +mystorage.json: 239 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +myTestTable: 410 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance +TestScript.js: 87 bytes, modified at 2025/02/14 11:10:38 UTC, 1 instance collContent.txt: 8 bytes, modified at 2024/05/24 13:59:36 UTC, NOT FOUND IN PATCH Total - Counting every abstraction instance - Indicates loading time diff --git a/maxdiff/tests/test_baselines/Test.amxd.txt b/maxdiff/tests/test_baselines/Test.amxd.txt index 6669878..15cfe92 100644 --- a/maxdiff/tests/test_baselines/Test.amxd.txt +++ b/maxdiff/tests/test_baselines/Test.amxd.txt @@ -39,7 +39,7 @@ project: collContent.txt ----------- patcher ----------- -appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] | default_fontsize: 10.0 | default_fontname: Arial Bold | gridsize: [8, 8] | boxanimatetime: 500 | latency: 0 | is_mpe: 0 | platform_compatibility: 0 | autosave: 0 +appversion: 9.0.7-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] | default_fontsize: 10.0 | default_fontname: Arial Bold | gridsize: [8, 8] | boxanimatetime: 500 | latency: 0 | is_mpe: 0 | external_mpe_tuning_enabled: 0 | platform_compatibility: 0 | autosave: 0 ----------- objects ----------- [comment NOTE: after any changes to this device, also update FrozenTest.amxd] [poly~ MyAbstraction] @@ -50,7 +50,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [coll] [p ImplicitDependencies] varname: ImplicitDependencies ----------- patcher ----------- - appversion: 8.6.4-x64-1 | rect: [60, 130, 639, 710] + appversion: 9.0.7-x64-1 | rect: [60, 130, 639, 710] ----------- objects ----------- [js TestScript] filename: TestScript | parameter_enable: 0 [comment We would expect implicit dependencies for these but they don't seem to be added.] bubble: 1 | bubbleside: 2 | linecount: 2 @@ -68,7 +68,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [buffer~ test shakerkicksnare.aif] [gen~ @gen times3.gendsp] [sfplay~ @audiofile shakerkicksnare.aif] - [node.script my-maxnode-basic.js] autostart: 0 | defer: 0 | watch: 0 + [node.script my-maxnode-basic.js] autostart: 0 | defer: 0 | watch: 0 | textfile: {'filename': 'my-maxnode-basic.js', 'flags': 0, 'embed': 0, 'autowatch': 1} [comment JSUI using script file] bubble: 1 [jsui] filename: VisibleBang.js [live.menu] pictures: [hz-icon.svg, beat-icon.svg] | remapsvgcolors: 1 | parameter: | usepicture: 1 | usesvgviewbox: 1 @@ -83,7 +83,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [message read myTestTable] (0) => (0) [table myTestTable] [bpatcher ThisWasAnAbstractionBeforeEmbeddingIt.maxpat] embed: 1 ----------- patcher ----------- - appversion: 8.6.4-x64-1 | rect: [927, 431, 640, 480] + appversion: 9.0.7-x64-1 | rect: [927, 431, 640, 480] ----------- objects ----------- [live.comment Embedded] [live.numbox] parameter: @@ -97,7 +97,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [button] [gen @t exponent] ----------- patcher ----------- - appversion: 8.6.4-x64-1 | classnamespace: dsp.gen | rect: [84, 144, 653, 641] + appversion: 9.0.7-x64-1 | classnamespace: dsp.gen | rect: [84, 144, 653, 641] ----------- objects ----------- [codebox] //============================================================ @@ -140,7 +140,7 @@ appversion: 8.6.4-x64-1 | rect: [91, 153, 1288, 310] | openrect: [0, 0, 0, 169] [coll @embed 1] coll_data: {'count': 2, 'data': [{'key': 0, 'value': ['test']}, {'key': 1, 'value': ['another', 'test']}]} | embed: 1 | precision: 6 [p MySubpatcher] ----------- patcher ----------- - appversion: 8.6.4-x64-1 | rect: [805, 282, 271, 250] + appversion: 9.0.7-x64-1 | rect: [805, 282, 271, 250] ----------- objects ----------- [live.dial] parameter: [t b b] diff --git a/maxdiff/tests/test_files/FrozenTest.amxd b/maxdiff/tests/test_files/FrozenTest.amxd index a7c18a4..8b90116 100644 Binary files a/maxdiff/tests/test_files/FrozenTest.amxd and b/maxdiff/tests/test_files/FrozenTest.amxd differ diff --git a/maxdiff/tests/test_files/Test.amxd b/maxdiff/tests/test_files/Test.amxd index fca4290..f17b6d8 100644 Binary files a/maxdiff/tests/test_files/Test.amxd and b/maxdiff/tests/test_files/Test.amxd differ