meerk40t 0.9.7030__py2.py3-none-any.whl → 0.9.7040__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meerk40t/balormk/clone_loader.py +3 -2
- meerk40t/balormk/controller.py +28 -11
- meerk40t/balormk/cylindermod.py +1 -0
- meerk40t/balormk/device.py +13 -9
- meerk40t/balormk/driver.py +9 -2
- meerk40t/balormk/galvo_commands.py +3 -1
- meerk40t/balormk/gui/gui.py +6 -0
- meerk40t/balormk/livelightjob.py +338 -321
- meerk40t/balormk/mock_connection.py +4 -3
- meerk40t/balormk/usb_connection.py +11 -2
- meerk40t/camera/camera.py +19 -14
- meerk40t/camera/gui/camerapanel.py +6 -0
- meerk40t/core/cutplan.py +109 -51
- meerk40t/core/elements/element_treeops.py +435 -140
- meerk40t/core/elements/elements.py +100 -9
- meerk40t/core/elements/shapes.py +259 -39
- meerk40t/core/elements/tree_commands.py +10 -5
- meerk40t/core/node/elem_ellipse.py +18 -8
- meerk40t/core/node/elem_image.py +51 -19
- meerk40t/core/node/elem_line.py +18 -8
- meerk40t/core/node/elem_path.py +18 -8
- meerk40t/core/node/elem_point.py +10 -4
- meerk40t/core/node/elem_polyline.py +19 -11
- meerk40t/core/node/elem_rect.py +18 -8
- meerk40t/core/node/elem_text.py +11 -5
- meerk40t/core/node/filenode.py +2 -8
- meerk40t/core/node/groupnode.py +11 -11
- meerk40t/core/node/image_processed.py +11 -5
- meerk40t/core/node/image_raster.py +11 -5
- meerk40t/core/node/node.py +64 -16
- meerk40t/core/node/refnode.py +2 -1
- meerk40t/core/svg_io.py +91 -34
- meerk40t/device/dummydevice.py +7 -1
- meerk40t/extra/vtracer.py +222 -0
- meerk40t/grbl/device.py +81 -8
- meerk40t/gui/about.py +20 -0
- meerk40t/gui/devicepanel.py +20 -16
- meerk40t/gui/gui_mixins.py +4 -0
- meerk40t/gui/icons.py +330 -253
- meerk40t/gui/laserpanel.py +8 -3
- meerk40t/gui/laserrender.py +41 -21
- meerk40t/gui/magnetoptions.py +158 -65
- meerk40t/gui/materialtest.py +229 -39
- meerk40t/gui/navigationpanels.py +229 -24
- meerk40t/gui/propertypanels/hatchproperty.py +2 -0
- meerk40t/gui/propertypanels/imageproperty.py +160 -106
- meerk40t/gui/ribbon.py +6 -1
- meerk40t/gui/scenewidgets/gridwidget.py +29 -32
- meerk40t/gui/scenewidgets/rectselectwidget.py +190 -192
- meerk40t/gui/simulation.py +75 -77
- meerk40t/gui/statusbarwidgets/defaultoperations.py +84 -48
- meerk40t/gui/statusbarwidgets/infowidget.py +2 -2
- meerk40t/gui/tips.py +15 -1
- meerk40t/gui/toolwidgets/toolpointmove.py +3 -1
- meerk40t/gui/wxmmain.py +242 -114
- meerk40t/gui/wxmscene.py +107 -24
- meerk40t/gui/wxmtree.py +4 -2
- meerk40t/gui/wxutils.py +60 -15
- meerk40t/image/imagetools.py +129 -65
- meerk40t/internal_plugins.py +4 -0
- meerk40t/kernel/kernel.py +39 -18
- meerk40t/kernel/settings.py +28 -9
- meerk40t/lihuiyu/device.py +24 -12
- meerk40t/main.py +1 -1
- meerk40t/moshi/device.py +20 -6
- meerk40t/network/console_server.py +22 -6
- meerk40t/newly/device.py +10 -3
- meerk40t/newly/gui/gui.py +10 -0
- meerk40t/ruida/device.py +22 -2
- meerk40t/ruida/loader.py +6 -3
- meerk40t/tools/geomstr.py +193 -125
- meerk40t/tools/rasterplotter.py +179 -93
- {meerk40t-0.9.7030.dist-info → meerk40t-0.9.7040.dist-info}/METADATA +1 -1
- {meerk40t-0.9.7030.dist-info → meerk40t-0.9.7040.dist-info}/RECORD +79 -78
- {meerk40t-0.9.7030.dist-info → meerk40t-0.9.7040.dist-info}/LICENSE +0 -0
- {meerk40t-0.9.7030.dist-info → meerk40t-0.9.7040.dist-info}/WHEEL +0 -0
- {meerk40t-0.9.7030.dist-info → meerk40t-0.9.7040.dist-info}/entry_points.txt +0 -0
- {meerk40t-0.9.7030.dist-info → meerk40t-0.9.7040.dist-info}/top_level.txt +0 -0
- {meerk40t-0.9.7030.dist-info → meerk40t-0.9.7040.dist-info}/zip-safe +0 -0
meerk40t/gui/materialtest.py
CHANGED
@@ -183,22 +183,34 @@ class TemplatePanel(wx.Panel):
|
|
183
183
|
self.SetHelpText("testpattern")
|
184
184
|
self.storage = storage
|
185
185
|
self.callback = None
|
186
|
+
self.secondary_callback = None
|
186
187
|
self.current_op = None
|
187
188
|
opchoices = [_("Cut"), _("Engrave"), _("Raster"), _("Image"), _("Hatch")]
|
188
189
|
# Setup 5 Op nodes - they aren't saved yet
|
189
190
|
self.default_op = []
|
191
|
+
self.secondary_default_op = []
|
190
192
|
# A tuple defining whether a free color-selection scheme is allowed, linked to default_op
|
191
193
|
self.color_scheme_free = []
|
192
194
|
self.default_op.append(CutOpNode())
|
195
|
+
self.secondary_default_op.append(None)
|
193
196
|
self.color_scheme_free.append(True)
|
197
|
+
|
194
198
|
self.default_op.append(EngraveOpNode())
|
195
199
|
self.color_scheme_free.append(True)
|
200
|
+
self.secondary_default_op.append(None)
|
201
|
+
|
196
202
|
self.default_op.append(RasterOpNode())
|
197
203
|
self.color_scheme_free.append(False)
|
204
|
+
self.secondary_default_op.append(None)
|
205
|
+
|
198
206
|
self.default_op.append(ImageOpNode())
|
199
207
|
self.color_scheme_free.append(True)
|
208
|
+
self.secondary_default_op.append(None)
|
209
|
+
|
210
|
+
# Hatch = Engrave
|
200
211
|
op = EngraveOpNode()
|
201
212
|
self.default_op.append(op)
|
213
|
+
self.secondary_default_op.append(HatchEffectNode())
|
202
214
|
self.color_scheme_free.append(True)
|
203
215
|
|
204
216
|
self.use_image = [False] * len(self.default_op)
|
@@ -577,6 +589,7 @@ class TemplatePanel(wx.Panel):
|
|
577
589
|
return result
|
578
590
|
|
579
591
|
def on_combo_image(self, event):
|
592
|
+
self.validate_input(event)
|
580
593
|
op = self.combo_ops.GetSelection()
|
581
594
|
if op != 3: # No Image?
|
582
595
|
return
|
@@ -592,8 +605,27 @@ class TemplatePanel(wx.Panel):
|
|
592
605
|
def set_callback(self, routine):
|
593
606
|
self.callback = routine
|
594
607
|
idx = self.combo_ops.GetSelection()
|
608
|
+
opnode = None
|
609
|
+
secondary_node = None
|
610
|
+
if idx >= 0:
|
611
|
+
opnode = self.default_op[idx]
|
612
|
+
secondary_node = self.secondary_default_op[idx]
|
595
613
|
if self.callback is not None and idx >= 0:
|
596
|
-
self.callback(
|
614
|
+
self.callback(opnode)
|
615
|
+
if self.secondary_callback is not None:
|
616
|
+
self.secondary_callback(secondary_node)
|
617
|
+
|
618
|
+
def set_secondary_callback(self, routine):
|
619
|
+
self.secondary_callback = routine
|
620
|
+
idx = self.combo_ops.GetSelection()
|
621
|
+
# opnode = None
|
622
|
+
secondary_node = None
|
623
|
+
if idx >= 0:
|
624
|
+
# opnode = self.default_op[idx]
|
625
|
+
secondary_node = self.secondary_default_op[idx]
|
626
|
+
|
627
|
+
if self.secondary_callback is not None:
|
628
|
+
self.secondary_callback(secondary_node)
|
597
629
|
|
598
630
|
def use_percent(self):
|
599
631
|
self.context.device.setting(bool, "use_percent_for_power_display", False)
|
@@ -653,19 +685,24 @@ class TemplatePanel(wx.Panel):
|
|
653
685
|
self.Freeze()
|
654
686
|
if opidx < 0:
|
655
687
|
opnode = None
|
688
|
+
secondary_node = None
|
656
689
|
self._freecolor = True
|
657
690
|
self.combo_images.Show(False)
|
658
691
|
self.text_dim_1.Enable(True)
|
659
692
|
self.text_dim_2.Enable(True)
|
660
693
|
else:
|
661
694
|
opnode = self.default_op[opidx]
|
695
|
+
secondary_node = self.secondary_default_op[opidx]
|
662
696
|
self._freecolor = self.color_scheme_free[opidx]
|
663
697
|
self.combo_images.Show(self.use_image[opidx])
|
664
698
|
self.text_dim_1.Enable(not self.use_image[opidx])
|
665
699
|
self.text_dim_2.Enable(not self.use_image[opidx])
|
700
|
+
|
666
701
|
self.sizer_param_op.Layout()
|
667
702
|
if self.callback is not None:
|
668
703
|
self.callback(opnode)
|
704
|
+
if self.secondary_callback is not None:
|
705
|
+
self.secondary_callback(secondary_node)
|
669
706
|
self.combo_color_1.Enable(self._freecolor)
|
670
707
|
self.combo_color_2.Enable(self._freecolor)
|
671
708
|
self.check_color_direction_1.Enable(self._freecolor)
|
@@ -732,13 +769,69 @@ class TemplatePanel(wx.Panel):
|
|
732
769
|
if "balor" in self.context.device.path:
|
733
770
|
balor_choices = [
|
734
771
|
("frequency", None, _("Frequency"), "kHz", False, True, None),
|
735
|
-
(
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
772
|
+
(
|
773
|
+
"rapid_speed",
|
774
|
+
preset_balor_rapid,
|
775
|
+
_("Rapid Speed"),
|
776
|
+
"mm/s",
|
777
|
+
False,
|
778
|
+
True,
|
779
|
+
None,
|
780
|
+
),
|
781
|
+
(
|
782
|
+
"delay_laser_on",
|
783
|
+
preset_balor_timings,
|
784
|
+
_("Laser On Delay"),
|
785
|
+
"µs",
|
786
|
+
False,
|
787
|
+
False,
|
788
|
+
None,
|
789
|
+
),
|
790
|
+
(
|
791
|
+
"delay_laser_off",
|
792
|
+
preset_balor_timings,
|
793
|
+
_("Laser Off Delay"),
|
794
|
+
"µs",
|
795
|
+
False,
|
796
|
+
False,
|
797
|
+
None,
|
798
|
+
),
|
799
|
+
(
|
800
|
+
"delay_polygon",
|
801
|
+
preset_balor_timings,
|
802
|
+
_("Polygon Delay"),
|
803
|
+
"µs",
|
804
|
+
False,
|
805
|
+
False,
|
806
|
+
None,
|
807
|
+
),
|
808
|
+
(
|
809
|
+
"wobble_radius",
|
810
|
+
preset_balor_wobble,
|
811
|
+
_("Wobble Radius"),
|
812
|
+
"mm",
|
813
|
+
True,
|
814
|
+
True,
|
815
|
+
None,
|
816
|
+
),
|
817
|
+
(
|
818
|
+
"wobble_interval",
|
819
|
+
preset_balor_wobble,
|
820
|
+
_("Wobble Interval"),
|
821
|
+
"mm",
|
822
|
+
True,
|
823
|
+
True,
|
824
|
+
None,
|
825
|
+
),
|
826
|
+
(
|
827
|
+
"wobble_speed",
|
828
|
+
preset_balor_wobble,
|
829
|
+
_("Wobble Speed Multiplier"),
|
830
|
+
"x",
|
831
|
+
False,
|
832
|
+
True,
|
833
|
+
None,
|
834
|
+
),
|
742
835
|
]
|
743
836
|
if self.context.device.pulse_width_enabled:
|
744
837
|
balor_choices.append(
|
@@ -1100,7 +1193,7 @@ class TemplatePanel(wx.Panel):
|
|
1100
1193
|
usefill = False
|
1101
1194
|
elif optype == 4: # Hatch
|
1102
1195
|
master_op = copy(self.default_op[optype])
|
1103
|
-
this_op =
|
1196
|
+
this_op = copy(self.secondary_default_op[optype])
|
1104
1197
|
master_op.add_node(this_op)
|
1105
1198
|
|
1106
1199
|
# We need to add a hatch node and make this the target for parameter application
|
@@ -1111,7 +1204,7 @@ class TemplatePanel(wx.Panel):
|
|
1111
1204
|
|
1112
1205
|
# Do we need to prep the op?
|
1113
1206
|
if param_prepper_1 is not None:
|
1114
|
-
param_prepper_1(
|
1207
|
+
param_prepper_1(master_op)
|
1115
1208
|
|
1116
1209
|
if param_keep_unit_1:
|
1117
1210
|
value = str(p_value_1) + param_unit_1
|
@@ -1125,9 +1218,10 @@ class TemplatePanel(wx.Panel):
|
|
1125
1218
|
# quick and dirty
|
1126
1219
|
if param_type_1 == "passes":
|
1127
1220
|
value = int(value)
|
1128
|
-
if param_type_1 == "hatch_distance"
|
1129
|
-
|
1130
|
-
|
1221
|
+
if param_type_1 == "hatch_distance" and not str(value).endswith(
|
1222
|
+
"mm"
|
1223
|
+
):
|
1224
|
+
value = f"{value}mm"
|
1131
1225
|
setattr(master_op, param_type_1, value)
|
1132
1226
|
# else: # Try setting
|
1133
1227
|
# master_op.settings[param_type_1] = value
|
@@ -1135,16 +1229,21 @@ class TemplatePanel(wx.Panel):
|
|
1135
1229
|
# quick and dirty
|
1136
1230
|
if param_type_1 == "passes":
|
1137
1231
|
value = int(value)
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1232
|
+
elif param_type_1 == "hatch_distance" and not str(
|
1233
|
+
value
|
1234
|
+
).endswith("mm"):
|
1235
|
+
value = f"{value}mm"
|
1236
|
+
elif param_type_1 == "hatch_angle" and not str(value).endswith(
|
1237
|
+
"deg"
|
1238
|
+
):
|
1239
|
+
value = f"{value}deg"
|
1141
1240
|
setattr(this_op, param_type_1, value)
|
1142
1241
|
elif hasattr(this_op, "settings"): # Try setting
|
1143
1242
|
this_op.settings[param_type_1] = value
|
1144
1243
|
|
1145
1244
|
# Do we need to prep the op?
|
1146
1245
|
if param_prepper_2 is not None:
|
1147
|
-
param_prepper_2(
|
1246
|
+
param_prepper_2(master_op)
|
1148
1247
|
|
1149
1248
|
if param_keep_unit_2:
|
1150
1249
|
value = str(p_value_2) + param_unit_2
|
@@ -1158,16 +1257,22 @@ class TemplatePanel(wx.Panel):
|
|
1158
1257
|
# quick and dirty
|
1159
1258
|
if param_type_2 == "passes":
|
1160
1259
|
value = int(value)
|
1161
|
-
if param_type_2 == "hatch_distance"
|
1162
|
-
|
1163
|
-
|
1260
|
+
if param_type_2 == "hatch_distance" and not str(value).endswith(
|
1261
|
+
"mm"
|
1262
|
+
):
|
1263
|
+
value = f"{value}mm"
|
1164
1264
|
setattr(master_op, param_type_2, value)
|
1165
1265
|
if hasattr(this_op, param_type_2):
|
1166
1266
|
if param_type_2 == "passes":
|
1167
1267
|
value = int(value)
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1268
|
+
elif param_type_2 == "hatch_distance" and not str(
|
1269
|
+
value
|
1270
|
+
).endswith("mm"):
|
1271
|
+
value = f"{value}mm"
|
1272
|
+
elif param_type_2 == "hatch_angle" and not str(value).endswith(
|
1273
|
+
"deg"
|
1274
|
+
):
|
1275
|
+
value = f"{value}deg"
|
1171
1276
|
setattr(this_op, param_type_2, value)
|
1172
1277
|
elif hasattr(this_op, "settings"): # Try setting
|
1173
1278
|
this_op.settings[param_type_2] = value
|
@@ -1186,10 +1291,8 @@ class TemplatePanel(wx.Panel):
|
|
1186
1291
|
# Add op to tree.
|
1187
1292
|
operation_branch.add_node(master_op)
|
1188
1293
|
# Now add a rectangle to the scene and assign it to the newly created op
|
1189
|
-
if usefill
|
1190
|
-
|
1191
|
-
else:
|
1192
|
-
fill_color = None
|
1294
|
+
fill_color = set_color if usefill else None
|
1295
|
+
elemnode = None
|
1193
1296
|
if shapetype == "image":
|
1194
1297
|
idx = self.combo_images.GetSelection() - 1
|
1195
1298
|
if 0 <= idx < len(self.images):
|
@@ -1217,8 +1320,9 @@ class TemplatePanel(wx.Panel):
|
|
1217
1320
|
fill=fill_color,
|
1218
1321
|
type="elem ellipse",
|
1219
1322
|
)
|
1220
|
-
elemnode
|
1221
|
-
|
1323
|
+
if elemnode is not None:
|
1324
|
+
elemnode.label = s_lbl
|
1325
|
+
this_op.add_reference(elemnode, 0)
|
1222
1326
|
_p_value_2 += delta_2
|
1223
1327
|
yy = yy + gap_y + size_y
|
1224
1328
|
_p_value_1 += delta_1
|
@@ -1284,8 +1388,8 @@ class TemplatePanel(wx.Panel):
|
|
1284
1388
|
return
|
1285
1389
|
|
1286
1390
|
if param_unit_1 == "deg":
|
1287
|
-
min_value_1 =
|
1288
|
-
max_value_1 =
|
1391
|
+
min_value_1 = float(self.text_min_1.GetValue())
|
1392
|
+
max_value_1 = float(self.text_max_1.GetValue())
|
1289
1393
|
elif param_unit_1 == "ppi":
|
1290
1394
|
min_value_1 = max(min_value_1, 0)
|
1291
1395
|
max_value_1 = min(max_value_1, 1000)
|
@@ -1299,8 +1403,8 @@ class TemplatePanel(wx.Panel):
|
|
1299
1403
|
max_value_1 = max(max_value_1, 0)
|
1300
1404
|
|
1301
1405
|
if param_unit_2 == "deg":
|
1302
|
-
min_value_2 =
|
1303
|
-
max_value_2 =
|
1406
|
+
min_value_2 = float(self.text_min_2.GetValue())
|
1407
|
+
max_value_2 = float(self.text_max_2.GetValue())
|
1304
1408
|
elif param_unit_2 == "ppi":
|
1305
1409
|
min_value_2 = max(min_value_2, 0)
|
1306
1410
|
max_value_2 = min(max_value_2, 1000)
|
@@ -1543,7 +1647,9 @@ class TemplateTool(MWindow):
|
|
1543
1647
|
|
1544
1648
|
self.storage = Settings(self.context.kernel.name, "templates.cfg")
|
1545
1649
|
self.storage.read_configuration()
|
1546
|
-
self.panel_instances =
|
1650
|
+
self.panel_instances = []
|
1651
|
+
self.primary_prop_panels = []
|
1652
|
+
self.secondary_prop_panels = []
|
1547
1653
|
self.panel_template = TemplatePanel(
|
1548
1654
|
self,
|
1549
1655
|
wx.ID_ANY,
|
@@ -1577,6 +1683,7 @@ class TemplateTool(MWindow):
|
|
1577
1683
|
self.notebook_main.AddPage(self.panel_template, _("Generator"))
|
1578
1684
|
|
1579
1685
|
self.panel_template.set_callback(self.set_node)
|
1686
|
+
self.panel_template.set_secondary_callback(self.set_secondary_node)
|
1580
1687
|
self.add_module_delegate(self.panel_template)
|
1581
1688
|
|
1582
1689
|
self.notebook_main.AddPage(self.panel_saveload, _("Templates"))
|
@@ -1628,13 +1735,95 @@ class TemplateTool(MWindow):
|
|
1628
1735
|
busy = wx.BusyCursor()
|
1629
1736
|
self.Freeze()
|
1630
1737
|
pages_to_instance = []
|
1631
|
-
|
1738
|
+
self.primary_prop_panels = []
|
1739
|
+
found = False
|
1740
|
+
for property_sheet in self.context.lookup_all(
|
1741
|
+
f"property/{node.__class__.__name__}/.*"
|
1742
|
+
):
|
1743
|
+
if not hasattr(property_sheet, "accepts") or property_sheet.accepts(node):
|
1744
|
+
self.primary_prop_panels.append((property_sheet, node))
|
1745
|
+
found = True
|
1746
|
+
# If we did not have any hits and the node is a reference
|
1747
|
+
# then we fall back to the master. So if in the future we
|
1748
|
+
# would have a property panel dealing with reference-nodes
|
1749
|
+
# then this would no longer apply.
|
1750
|
+
if node.type == "reference" and not found:
|
1751
|
+
snode = node.node
|
1752
|
+
found = False
|
1753
|
+
for property_sheet in self.context.lookup_all(
|
1754
|
+
f"property/{snode.__class__.__name__}/.*"
|
1755
|
+
):
|
1756
|
+
if not hasattr(property_sheet, "accepts") or property_sheet.accepts(
|
1757
|
+
snode
|
1758
|
+
):
|
1759
|
+
self.primary_prop_panels.append((property_sheet, snode))
|
1760
|
+
found = True
|
1761
|
+
|
1762
|
+
self.primary_prop_panels.sort(key=sort_priority, reverse=True)
|
1763
|
+
pages_to_instance.extend(self.primary_prop_panels)
|
1764
|
+
pages_to_instance.extend(self.secondary_prop_panels)
|
1765
|
+
|
1766
|
+
for p in self.panel_instances:
|
1767
|
+
try:
|
1768
|
+
p.pane_hide()
|
1769
|
+
except AttributeError:
|
1770
|
+
pass
|
1771
|
+
self.remove_module_delegate(p)
|
1772
|
+
|
1773
|
+
# Delete all but the first and last page...
|
1774
|
+
while self.notebook_main.GetPageCount() > 2:
|
1775
|
+
self.notebook_main.DeletePage(1)
|
1776
|
+
for prop_sheet, instance in pages_to_instance:
|
1777
|
+
page_panel = prop_sheet(
|
1778
|
+
self.notebook_main, wx.ID_ANY, context=self.context, node=instance
|
1779
|
+
)
|
1780
|
+
try:
|
1781
|
+
name = prop_sheet.name
|
1782
|
+
except AttributeError:
|
1783
|
+
name = instance.__class__.__name__
|
1784
|
+
|
1785
|
+
self.notebook_main.InsertPage(1, page_panel, _(name))
|
1786
|
+
try:
|
1787
|
+
page_panel.set_widgets(instance)
|
1788
|
+
except AttributeError:
|
1789
|
+
pass
|
1790
|
+
self.add_module_delegate(page_panel)
|
1791
|
+
self.panel_instances.append(page_panel)
|
1792
|
+
try:
|
1793
|
+
page_panel.pane_show()
|
1794
|
+
except AttributeError:
|
1795
|
+
pass
|
1796
|
+
page_panel.Layout()
|
1797
|
+
try:
|
1798
|
+
page_panel.SetupScrolling()
|
1799
|
+
except AttributeError:
|
1800
|
+
pass
|
1801
|
+
|
1802
|
+
self.Layout()
|
1803
|
+
self.Thaw()
|
1804
|
+
del busy
|
1805
|
+
|
1806
|
+
def set_secondary_node(self, node):
|
1807
|
+
def sort_priority(prop):
|
1808
|
+
prop_sheet, node = prop
|
1809
|
+
return (
|
1810
|
+
getattr(prop_sheet, "priority")
|
1811
|
+
if hasattr(prop_sheet, "priority")
|
1812
|
+
else 0
|
1813
|
+
)
|
1814
|
+
|
1815
|
+
if node is None:
|
1816
|
+
return
|
1817
|
+
busy = wx.BusyCursor()
|
1818
|
+
self.Freeze()
|
1819
|
+
pages_to_instance = []
|
1820
|
+
self.secondary_prop_panels = []
|
1632
1821
|
found = False
|
1633
1822
|
for property_sheet in self.context.lookup_all(
|
1634
1823
|
f"property/{node.__class__.__name__}/.*"
|
1635
1824
|
):
|
1636
1825
|
if not hasattr(property_sheet, "accepts") or property_sheet.accepts(node):
|
1637
|
-
|
1826
|
+
self.secondary_prop_panels.append((property_sheet, node))
|
1638
1827
|
found = True
|
1639
1828
|
# If we did not have any hits and the node is a reference
|
1640
1829
|
# then we fall back to the master. So if in the future we
|
@@ -1649,11 +1838,12 @@ class TemplateTool(MWindow):
|
|
1649
1838
|
if not hasattr(property_sheet, "accepts") or property_sheet.accepts(
|
1650
1839
|
snode
|
1651
1840
|
):
|
1652
|
-
|
1841
|
+
self.secondary_prop_panels.append((property_sheet, snode))
|
1653
1842
|
found = True
|
1654
1843
|
|
1655
|
-
|
1656
|
-
pages_to_instance.extend(
|
1844
|
+
self.secondary_prop_panels.sort(key=sort_priority, reverse=True)
|
1845
|
+
pages_to_instance.extend(self.primary_prop_panels)
|
1846
|
+
pages_to_instance.extend(self.secondary_prop_panels)
|
1657
1847
|
|
1658
1848
|
for p in self.panel_instances:
|
1659
1849
|
try:
|