I want to expose a function with two arguments and two optional inputs:
#include <maxscript/maxscript.h>
#include <maxscript/maxwrapper/mxsobjects.h>
#include <maxscript/macros/define_instantiation_functions.h>
def_visible_primitive(TestFunction, "TestFunction");
Value* TestFunction_cf(Value **arg_list, int count)
{
// TestFunction <argA> <argB> [optionA:false] [optionB:false]
check_arg_count_with_keys(TestFunction, 2, count);
Value* tmp = NULL;
BOOL optionA = bool_key_arg(optionA, tmp, FALSE);
BOOL optionB = bool_key_arg(optionB, tmp, FALSE);
return &ok;
}
But I got error:
Error C2065 'n_optionA': undeclared identifier
Error C2065 'n_optionB': undeclared identifier
Where I should declare them?
