[Panelize][Added] Expand text variables and KiBot %X markers

- in text objects

Related to #497
This commit is contained in:
Salvador E. Tropea 2023-09-24 17:13:33 -03:00
parent 9ce2321890
commit b6815b6a94
4 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `fixed_auto_camera`: to avoid adjusting the automatic camera on each frame
- Camera option to set the clip start (#484)
- Traceback dump when Blender output contains it
- KiKit
- Expand text variables and KiBot %X markers in text objects (see #497)
- Populate:
- Basic support for regular list items (#480)
- Help for the error levels

View File

@ -1720,6 +1720,8 @@ outputs:
drawtabfail: false
# [boolean=false] Trace
trace: false
# [boolean=true] Expand text variables and KiBot %X markers in text objects
expand_text: true
# [string=''] A configuration to use as base for this one. Use the following format: `OUTPUT_NAME[CFG_NAME]`
extends: ''
# [dict] Used to add fiducial marks to the (rail/frame of) the panel

View File

@ -217,6 +217,7 @@ Parameters:
- ``drawtabfail`` :index:`: <pair: output - panelize - options - configs - debug; drawtabfail>` [boolean=false] Draw tab fail.
- ``trace`` :index:`: <pair: output - panelize - options - configs - debug; trace>` [boolean=false] Trace.
- ``expand_text`` :index:`: <pair: output - panelize - options - configs; expand_text>` [boolean=true] Expand text variables and KiBot %X markers in text objects.
- ``extends`` :index:`: <pair: output - panelize - options - configs; extends>` [string=''] A configuration to use as base for this one. Use the following format: `OUTPUT_NAME[CFG_NAME]`.
- ``name`` :index:`: <pair: output - panelize - options - configs; name>` [string=''] A name to identify this configuration. If empty will be the order in the list, starting with 1.
Don't use just a number or it will be confused as an index.

View File

@ -361,6 +361,8 @@ class PanelizeText(PanelOptions):
res = Layer.solve(self.layer)
if len(res) > 1:
raise KiPlotConfigurationError('Must select only one layer for the text ({})'.format(self.layer))
if parent.expand_text:
self.text = parent.expand_filename_both(self.text, is_sch=False, make_safe=False)
class PanelizeCopperfill(PanelOptions):
@ -523,6 +525,8 @@ class PanelizeConfig(PanelOptions):
""" [dict] Debug options """
self.source = PanelizeSource
""" [dict] Used to adjust details of which part of the PCB is panelized """
self.expand_text = True
""" Expand text variables and KiBot %X markers in text objects """
super().__init__()
def config(self, parent):