I think (but not sure, or maybe this got changed/fixed at some point) the 'trick' is to name a parameter
blahInOptional or
blahOutOptional, that works for these API function for optional int/numbers at least.
BR_EnvGetProperties:
Code:
boolean active, boolean visible, boolean armed, boolean inLane, number laneHeight, number defaultShape, number minValue, number maxValue, number centerValue, number type, boolean faderScaling, optional number automationItemsOptions = reaper.BR_EnvGetProperties(BR_Envelope envelope)
BR_EnvSetProperties:
Code:
reaper.BR_EnvSetProperties(BR_Envelope envelope, boolean active, boolean visible, boolean armed, boolean inLane, integer laneHeight, integer defaultShape, boolean faderScaling, optional number automationItemsOptionsIn)
edit:
I haven't tried if this also works for an optional boolean parameter though.
edit2:
Ok, for an optional boolean input parameter I think I can confirm it doesn't work quite right.
Code:
C: const char* ULT_GetMediaItemNote(MediaItem* item, bool blahInOptional)
EEL: bool extension_api("ULT_GetMediaItemNote", #retval, MediaItem item, bool blahIn)
Lua: string reaper.ULT_GetMediaItemNote(MediaItem item, boolean blahIn)
Python: String ULT_GetMediaItemNote(MediaItem item, Boolean blahInOptional)