Pixnub Home Page Forums EZ Green Screen EZGS Extract Image command Reply To: EZGS Extract Image command

#7026933
JEFF HARMON
Participant

    Here is what it looked like:

    const ezgsExctractcommand = async () => {
        try {
            const allPlugins = pluginManager.plugins;
            const plugin = Array.from(allPlugins).find(plugin => plugin.id === "6d9103ae");
            if (plugin && plugin.enabled) {
                await plugin.invokeCommand("ezgsCommand");
        }
        } catch (e) {
            console.error(e);
        }
    }
    const executeHealCrop = async() => {
        ...
        await ezgsExctractcommand();
        await executeAsModal(async () => {
            // do my stuff
        }, { commandName: "Heal Crop" })
            .then(res => console.debug("saveDocumentAs:done"))
            .catch(err => {
                throw new Error("utility.saveDocumentAs:err", err)
            });
    }