Page MenuHome
Paste P1060

RNA variable size return question
ActivePublic

Authored by Hans Goudey (HooglyBoogly) on Aug 2 2019, 4:49 AM.
func = RNA_def_function(srna, "sample_segments", "rna_ProfileWidget_sample_segments");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Sample the given number of segments from the profile");
parm = RNA_def_int(func, "segments", 1, 1, PROF_TABLE_MAX, "Length Portion",
"How many segments to sample from the control points", 1, PROF_TABLE_MAX);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* HANS-TODO: Needs variable size return array */
parm = RNA_def_float_vector(func, "samples", 2 * 0, NULL, -100.0f, 100.0f, "Samples",
"The location at that portion of the profile", -100.0f, 100.0f);
RNA_def_function_output(func, parm);

Event Timeline

Hans Goudey (HooglyBoogly) updated the paste's language from autodetect to c.