gpeRunPresetGen
gpeRunPresetGen(
t_functionName
d_figGroupId
)
=> t / nil
Description
Invokes the specified preset generator function on the active figGroup. The figGroup is updated according to the preset generator logic. Ensure that the Grid Pattern Editor (GPE) assistant is open when running this command. Also ensure that the selection argument specifies a valid Modgen figGroup and that the preset is registered correctly.
Arguments
Value Returned
Example
In the following example, first the preset function is defined. Custom checks are performed on the preset function to determine when the preset function has to be displayed. Finally, the preset function is registered.
procedure(test_preset(sbox @optional selection) print("Hello world"))
=> test_preset
gpeUnregisterPresetGen("test_preset")
=> t
gpeRegisterPresetGen("gen1" "test_preset" "")
=> t
gpeRunPresetGen("gen1" css())
=> Hello world
=> nil
Return to top