Closed RivenSkaye closed 3 years ago
I'm not a fan of inventing new syntax, to be honest. Is this any better than just adding props to the substitutions dict? Name collisions with predefined placeholders could be a reason, but I don't think this would be an issue in practice since props themselves live in a global namespace, which encourage names to be quite specific.
This allows for users to select any frameprops they'd like. I could change it to check if the substitution names exist in the dict already instead so the prop:
prefix can be dropped. The main goal here is to allow selecting frameprops other than the reserved ones since everything can add to the dict at any time, making the amount of possible frameprops virtually limitless
This allows users to get any frameprops set by filters and functions from *func scripts. For example VFM's VFMMatch or VFMSceneChange, or PlaneStatsDiff additions. Usage is fairly simple, it adds a parsing step to the template to process placeholders in the form of
{prop:propname}
, wherepropname
must be an exact match to what is registered in the frameprops. Ifpropname
doesn't exist, the placeholder will be substituted withno-
prefixed to the given value forpropname
.It also accepts underscores as an undocumented feature because keyword arguments are not allowed to contain characters like a colon (
:
), so it silently replacesprop:
withprop_