gpeIsPresetGenDisplayable
gpeIsPresetGenDisplayable(
t_functionName
d_figGroupId
)
=> t / nil
Description
Checks whether the given preset generator is displayed in the Preset drop-down of the Grid Pattern Editor for the selected Modgen.
Arguments
|
Specifies the name of the function that needs to be checked for display. |
|
|
Specifies the database ID of the Modgen figGroup to be checked for the specified preset display. |
Value Returned
|
The preset generator is displayed in the Preset drop-down list of the Grid Pattern Editor. |
|
|
The function is not displayed in the Preset drop-down list of the Grid Pattern Editor. |
Example
The following procedure first defines a preset function. Custom checks are performed to determine when the preset function is displayed. Then the function is registered and tested and whether the given preset generator can be displayed in the Preset drop-down list of the Grid Pattern Editor.
procedure(test_preset(sbox @optional selection) print("Hello world"))
=> test_preset
gpeUnregisterPresetGen("test_preset")
=> t if registered; nil if not registered
procedure(test_preset_check(args) nil)
=> test_preset_check
gpeRegisterPresetGen("gen1" "test_preset" "test_preset_check")
=> t
gpeIsRegisteredPresetGen("test_preset")
=>t
a = car(setof(fg geGetEditCellView()~>figGroups fg~>type=="modgen"))
=> db:0x649b1c9a
gpeIsPresetGenDisplayable("test_preset" a)
=> nil
Return to top