mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 08:13:22 +00:00
Plug-ins: file-key exemptions name only params a command takes
A command now counts as taking a file or folder when its params description (with the commands its `…` entries name) or its schema takes a file key as a param. A word in the description's prose or result no longer counts; a description whose keys are not known keeps the text scan. The code of the call-time scan of arguments is unchanged, but it reads the changed exemption tables. The confined run is unchanged. - NOT_FILES drops seven entries that named no param of their command (object.setLiveShape path, path.reverse paths, object.pathfinder.options paths, object.maskImage path, imageTrace.make paths, svgInteractivity.info files, addon.cleanup.rejoin paths). A top-level `path` to object.setLiveShape or object.maskImage, `paths` to path.reverse, imageTrace.make or addon.cleanup.rejoin, and `files` to svgInteractivity.info are now refused. - Image Trace's path fidelity setting is exempt only inside `params` and `savedPreset` of imageTrace.make and imageTrace.makeAndExpand, so a call with it is no longer refused. - every_command_is_sorted checks that each exemption names a param its command takes, and that each nested exemption starts at one. - effect.expandAsWireframes is reviewed as allowed and stroke.arrowheads.list as refused.
This commit is contained in:
@@ -166,6 +166,7 @@ pub(super) const ALLOWED: &[&str] = &[
|
||||
"effect.deferredStatus",
|
||||
"effect.duplicate",
|
||||
"effect.expandAppearance",
|
||||
"effect.expandAsWireframes",
|
||||
"effect.list",
|
||||
"effect.move",
|
||||
"effect.remove",
|
||||
@@ -690,8 +691,8 @@ pub(super) const ALLOWED: &[&str] = &[
|
||||
];
|
||||
|
||||
/// Commands a plug-in may not call although no rule refuses them, in order: they change the
|
||||
/// preferences, a tool's options, a drag's state or the font names the whole app knows, or run
|
||||
/// plug-ins again.
|
||||
/// preferences, a tool's options, a drag's state or the font names the whole app knows, run
|
||||
/// plug-ins again, or read a file and report where it is on disk.
|
||||
pub(super) const DENIED: &[&str] = &[
|
||||
"addon.cleanup.splitText",
|
||||
"addon.pathtools.movePointsTogether",
|
||||
@@ -703,5 +704,6 @@ pub(super) const DENIED: &[&str] = &[
|
||||
"object.liquify",
|
||||
"object.pathfinder.options",
|
||||
"stroke.arrowheads.edit",
|
||||
"stroke.arrowheads.list",
|
||||
"type.compositeFonts.set",
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user