Variant Renamer KiCost style
This filter implements the kicost.VARIANT:FIELD=VALUE renamer to get FIELD=VALUE when VARIANT is in use.
It applies the KiCost concept of variants (a regex to match the VARIANT).
As an example: a field named kicost.V1:MPN with value 1N4001 will change the field MPN to be 1N4001 when a variant in use matches the V1 string.
Note that this mechanism can be used to change a footprint, i.e. kicost.VARIANT:Footprint assigned with Diode_SMD:D_0805_2012Metric will change the footprint when VARIANT is matched. Of course the footprints should be similar, or your PCB will become invalid.
The internal _var_rename_kicost filter is configured to emulate the KiCost behavior. You can create other filters to fine-tune the behavior, i.e. you can make the mechanism to be triggered by fields like kibot.VARIANT|FIELD.
comment : [string] (default:
'') A comment for documentation purposes.name : [string] (default:
'') Used to identify this particular filter definition.
prefix: [string] (default:'kicost.') A mandatory prefix. Is not case sensitive.
separator: [string] (default:':') Separator used between the variant and the field name.
variant: [string] (default:'') Variant regex to match the VARIANT part. When empty the currently selected variant is used.
variant_to_value: [boolean] (default:false) Rename fields matching the variant to the value of the component.