Blender  V3.3
Classes | Macros | Typedefs | Functions | Variables
makesrna.c File Reference
#include <errno.h>
#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_string.h"
#include "BLI_system.h"
#include "BLI_utildefines.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "RNA_types.h"
#include "rna_internal.h"
#include "CLG_log.h"
#include <sys/stat.h>
#include "RNA_enum_items.h"

Go to the source code of this file.

Classes

struct  RNAProcessItem
 

Macros

#define TMP_EXT   ".tmp"
 
#define WRITE_COMMA
 
#define WRITE_PARAM(param)
 
#define REN_IF_DIFF
 
#define RNA_MAKESRNA
 
#define DEF_ENUM(id)
 

Typedefs

typedef struct RNAProcessItem RNAProcessItem
 

Functions

void BLI_system_backtrace (FILE *fp)
 
static int file_older (const char *file1, const char *file2)
 
static void rna_generate_static_parameter_prototypes (FILE *f, StructRNA *srna, FunctionDefRNA *dfunc, const char *name_override, int close_prototype)
 
static int replace_if_different (const char *tmpfile, const char *dep_files[])
 
static const char * rna_safe_id (const char *id)
 
static int cmp_struct (const void *a, const void *b)
 
static int cmp_property (const void *a, const void *b)
 
static int cmp_def_struct (const void *a, const void *b)
 
static int cmp_def_property (const void *a, const void *b)
 
static void rna_sortlist (ListBase *listbase, int(*cmp)(const void *, const void *))
 
static void rna_print_c_string (FILE *f, const char *str)
 
static void rna_print_data_get (FILE *f, PropertyDefRNA *dp)
 
static void rna_print_id_get (FILE *f, PropertyDefRNA *UNUSED(dp))
 
static void rna_construct_function_name (char *buffer, int size, const char *structname, const char *propname, const char *type)
 
static void rna_construct_wrapper_function_name (char *buffer, int size, const char *structname, const char *propname, const char *type)
 
voidrna_alloc_from_buffer (const char *buffer, int buffer_len)
 
voidrna_calloc (int buffer_len)
 
static char * rna_alloc_function_name (const char *structname, const char *propname, const char *type)
 
static StructRNArna_find_struct (const char *identifier)
 
static const char * rna_find_type (const char *type)
 
static const char * rna_find_dna_type (const char *type)
 
static const char * rna_type_type_name (PropertyRNA *prop)
 
static const char * rna_type_type (PropertyRNA *prop)
 
static const char * rna_type_struct (PropertyRNA *prop)
 
static const char * rna_parameter_type_name (PropertyRNA *parm)
 
static int rna_enum_bitmask (PropertyRNA *prop)
 
static int rna_color_quantize (PropertyRNA *prop, PropertyDefRNA *dp)
 
static const char * rna_enum_id_from_pointer (const EnumPropertyItem *item)
 
static const char * rna_function_string (const void *func)
 
static void rna_float_print (FILE *f, float num)
 
static void rna_int_print (FILE *f, int64_t num)
 
static char * rna_def_property_get_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 
static void rna_clamp_value_range (FILE *f, PropertyRNA *prop)
 
static void rna_clamp_value (FILE *f, PropertyRNA *prop, int array)
 
static char * rna_def_property_search_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *UNUSED(dp), const char *manualfunc)
 
static char * rna_def_property_set_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 
static char * rna_def_property_length_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 
static char * rna_def_property_begin_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
 
static char * rna_def_property_lookup_int_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc, const char *nextfunc)
 
static char * rna_def_property_lookup_string_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc, const char *item_type)
 
static char * rna_def_property_next_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *UNUSED(dp), const char *manualfunc)
 
static char * rna_def_property_end_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *UNUSED(dp), const char *manualfunc)
 
static void rna_set_raw_property (PropertyDefRNA *dp, PropertyRNA *prop)
 
static void rna_set_raw_offset (FILE *f, StructRNA *srna, PropertyRNA *prop)
 
static void rna_def_property_funcs (FILE *f, StructRNA *srna, PropertyDefRNA *dp)
 
static void rna_def_property_funcs_header (FILE *f, StructRNA *srna, PropertyDefRNA *dp)
 
static void rna_def_function_funcs_header (FILE *f, StructRNA *srna, FunctionDefRNA *dfunc)
 
static void rna_def_property_funcs_header_cpp (FILE *f, StructRNA *srna, PropertyDefRNA *dp)
 
static const char * rna_parameter_type_cpp_name (PropertyRNA *prop)
 
static void rna_def_struct_function_prototype_cpp (FILE *f, StructRNA *UNUSED(srna), FunctionDefRNA *dfunc, const char *namespace, int close_prototype)
 
static void rna_def_struct_function_header_cpp (FILE *f, StructRNA *srna, FunctionDefRNA *dfunc)
 
static void rna_def_property_funcs_impl_cpp (FILE *f, StructRNA *srna, PropertyDefRNA *dp)
 
static void rna_def_struct_function_call_impl_cpp (FILE *f, StructRNA *srna, FunctionDefRNA *dfunc)
 
static void rna_def_struct_function_impl_cpp (FILE *f, StructRNA *srna, FunctionDefRNA *dfunc)
 
static void rna_def_property_wrapper_funcs (FILE *f, StructDefRNA *dsrna, PropertyDefRNA *dp)
 
static void rna_def_function_wrapper_funcs (FILE *f, StructDefRNA *dsrna, FunctionDefRNA *dfunc)
 
static void rna_def_function_funcs (FILE *f, StructDefRNA *dsrna, FunctionDefRNA *dfunc)
 
static void rna_auto_types (void)
 
static void rna_sort (BlenderRNA *brna)
 
static const char * rna_property_structname (PropertyType type)
 
static const char * rna_property_subtypename (PropertySubType type)
 
static const char * rna_property_subtype_unit (PropertySubType type)
 
static void rna_generate_struct_rna_prototypes (BlenderRNA *brna, FILE *f)
 
static void rna_generate_blender (BlenderRNA *brna, FILE *f)
 
static void rna_generate_external_property_prototypes (BlenderRNA *brna, FILE *f)
 
static void rna_generate_internal_property_prototypes (BlenderRNA *UNUSED(brna), StructRNA *srna, FILE *f)
 
static void rna_generate_parameter_prototypes (BlenderRNA *UNUSED(brna), StructRNA *srna, FunctionRNA *func, FILE *f)
 
static void rna_generate_function_prototypes (BlenderRNA *brna, StructRNA *srna, FILE *f)
 
static void rna_generate_static_function_prototypes (BlenderRNA *UNUSED(brna), StructRNA *srna, FILE *f)
 
static void rna_generate_struct_prototypes (FILE *f)
 
static void rna_generate_property (FILE *f, StructRNA *srna, const char *nest, PropertyRNA *prop)
 
static void rna_generate_struct (BlenderRNA *UNUSED(brna), StructRNA *srna, FILE *f)
 
static void rna_generate (BlenderRNA *brna, FILE *f, const char *filename, const char *api_filename)
 
static void rna_generate_header (BlenderRNA *UNUSED(brna), FILE *f)
 
static int rna_is_collection_prop (PropertyRNA *prop)
 
static int rna_is_collection_functions_struct (const char **collection_structs, const char *struct_name)
 
static void rna_generate_header_class_cpp (StructDefRNA *ds, FILE *f)
 
static void rna_generate_header_cpp (BlenderRNA *UNUSED(brna), FILE *f)
 
static void make_bad_file (const char *file, int line)
 
static int rna_preprocess (const char *outfile, const char *public_header_outfile)
 
static void mem_error_cb (const char *errorStr)
 
int main (int argc, char **argv)
 

Variables

static CLG_LogRef LOG = {"makesrna"}
 
static int debugSRNA = 0
 
static const char * makesrna_path = NULL
 
static RNAProcessItem PROCESS_ITEMS []
 
static const char * cpp_classes
 

Macro Definition Documentation

◆ DEF_ENUM

#define DEF_ENUM (   id)
Value:
if (item == id) { \
return STRINGIFY(id); \
}
#define STRINGIFY(x)

◆ REN_IF_DIFF

#define REN_IF_DIFF
Value:
{ \
FILE *file_test = fopen(orgfile, "rb"); \
if (file_test) { \
fclose(file_test); \
if (fp_org) { \
fclose(fp_org); \
} \
if (fp_new) { \
fclose(fp_new); \
} \
if (remove(orgfile) != 0) { \
CLOG_ERROR(&LOG, "remove error (%s): \"%s\"", strerror(errno), orgfile); \
return -1; \
} \
} \
} \
if (rename(tmpfile, orgfile) != 0) { \
CLOG_ERROR(&LOG, "rename error (%s): \"%s\" -> \"%s\"", strerror(errno), tmpfile, orgfile); \
return -1; \
} \
remove(tmpfile); \
return 1
static CLG_LogRef LOG
Definition: makesrna.c:36

◆ RNA_MAKESRNA

#define RNA_MAKESRNA

◆ TMP_EXT

#define TMP_EXT   ".tmp"

Definition at line 55 of file makesrna.c.

◆ WRITE_COMMA

#define WRITE_COMMA
Value:
{ \
if (!first) { \
fprintf(f, ", "); \
} \
first = 0; \
} \
(void)0
SyclQueue void void size_t num_bytes void

Definition at line 85 of file makesrna.c.

◆ WRITE_PARAM

#define WRITE_PARAM (   param)
Value:
{ \
WRITE_COMMA; \
fprintf(f, param); \
} \
(void)0

Definition at line 94 of file makesrna.c.

Typedef Documentation

◆ RNAProcessItem

Function Documentation

◆ BLI_system_backtrace()

void BLI_system_backtrace ( FILE *  fp)

◆ cmp_def_property()

static int cmp_def_property ( const void a,
const void b 
)
static

Definition at line 296 of file makesrna.c.

References Freestyle::a, usdtokens::b(), cmp_property(), and PropertyDefRNA::prop.

Referenced by rna_sort().

◆ cmp_def_struct()

static int cmp_def_struct ( const void a,
const void b 
)
static

Definition at line 288 of file makesrna.c.

References Freestyle::a, usdtokens::b(), cmp_struct(), and StructDefRNA::srna.

Referenced by rna_sort().

◆ cmp_property()

static int cmp_property ( const void a,
const void b 
)
static

Definition at line 266 of file makesrna.c.

References Freestyle::a, usdtokens::b(), PropertyRNA::identifier, PropertyRNA::name, and STREQ.

Referenced by cmp_def_property(), and rna_sort().

◆ cmp_struct()

static int cmp_struct ( const void a,
const void b 
)
static

Definition at line 258 of file makesrna.c.

References Freestyle::a, usdtokens::b(), and StructRNA::identifier.

Referenced by cmp_def_struct(), and rna_sort().

◆ file_older()

static int file_older ( const char *  file1,
const char *  file2 
)
static

Definition at line 59 of file makesrna.c.

References debugSRNA.

Referenced by replace_if_different().

◆ main()

int main ( int  argc,
char **  argv 
)

◆ make_bad_file()

static void make_bad_file ( const char *  file,
int  line 
)
static

Definition at line 5170 of file makesrna.c.

References file.

Referenced by rna_preprocess().

◆ mem_error_cb()

static void mem_error_cb ( const char *  errorStr)
static

Definition at line 5358 of file makesrna.c.

Referenced by main().

◆ replace_if_different()

static int replace_if_different ( const char *  tmpfile,
const char *  dep_files[] 
)
static

◆ rna_alloc_from_buffer()

void* rna_alloc_from_buffer ( const char *  buffer,
int  buffer_len 
)

◆ rna_alloc_function_name()

static char* rna_alloc_function_name ( const char *  structname,
const char *  propname,
const char *  type 
)
static

◆ rna_auto_types()

static void rna_auto_types ( void  )
static

◆ rna_calloc()

void* rna_calloc ( int  buffer_len)

◆ rna_clamp_value()

static void rna_clamp_value ( FILE *  f,
PropertyRNA prop,
int  array 
)
static

◆ rna_clamp_value_range()

static void rna_clamp_value_range ( FILE *  f,
PropertyRNA prop 
)
static

◆ rna_color_quantize()

static int rna_color_quantize ( PropertyRNA prop,
PropertyDefRNA dp 
)
static

◆ rna_construct_function_name()

static void rna_construct_function_name ( char *  buffer,
int  size,
const char *  structname,
const char *  propname,
const char *  type 
)
static

Definition at line 386 of file makesrna.c.

References buffer, size(), snprintf, and type.

Referenced by rna_alloc_function_name().

◆ rna_construct_wrapper_function_name()

static void rna_construct_wrapper_function_name ( char *  buffer,
int  size,
const char *  structname,
const char *  propname,
const char *  type 
)
static

◆ rna_def_function_funcs()

static void rna_def_function_funcs ( FILE *  f,
StructDefRNA dsrna,
FunctionDefRNA dfunc 
)
static

◆ rna_def_function_funcs_header()

static void rna_def_function_funcs_header ( FILE *  f,
StructRNA srna,
FunctionDefRNA dfunc 
)
static

◆ rna_def_function_wrapper_funcs()

static void rna_def_function_wrapper_funcs ( FILE *  f,
StructDefRNA dsrna,
FunctionDefRNA dfunc 
)
static

◆ rna_def_property_begin_func()

static char* rna_def_property_begin_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA dp,
const char *  manualfunc 
)
static

◆ rna_def_property_end_func()

static char* rna_def_property_end_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA UNUSEDdp,
const char *  manualfunc 
)
static

◆ rna_def_property_funcs()

static void rna_def_property_funcs ( FILE *  f,
StructRNA srna,
PropertyDefRNA dp 
)
static

Definition at line 1836 of file makesrna.c.

References PropertyRNA::arraydimension, CollectionPropertyRNA::begin, PropertyDefRNA::booleanbit, CLOG_ERROR, DefRNA, PropertyDefRNA::dnalengthfixed, PropertyDefRNA::dnalengthname, PropertyDefRNA::dnatype, CollectionPropertyRNA::end, BlenderDefRNA::error, PropertyRNA::flag, PropertyRNA::flag_internal, BoolPropertyRNA::get, IntPropertyRNA::get, FloatPropertyRNA::get, StringPropertyRNA::get, EnumPropertyRNA::get, PointerPropertyRNA::get, CollectionPropertyRNA::get, BoolPropertyRNA::getarray, IntPropertyRNA::getarray, FloatPropertyRNA::getarray, PropertyRNA::identifier, StructRNA::identifier, CollectionPropertyRNA::item_type, StringPropertyRNA::length, CollectionPropertyRNA::length, LOG, CollectionPropertyRNA::lookupint, CollectionPropertyRNA::lookupstring, CollectionPropertyRNA::next, PropertyDefRNA::prop, PROP_BOOLEAN, PROP_COLLECTION, PROP_ENUM, PROP_FLOAT, PROP_IDPROPERTY, PROP_INT, PROP_INTERN_RAW_ARRAY, PROP_POINTER, PROP_STRING, rna_def_property_begin_func(), rna_def_property_end_func(), rna_def_property_get_func(), rna_def_property_length_func(), rna_def_property_lookup_int_func(), rna_def_property_lookup_string_func(), rna_def_property_next_func(), rna_def_property_search_func(), rna_def_property_set_func(), rna_set_raw_property(), StringPropertyRNA::search, BoolPropertyRNA::set, IntPropertyRNA::set, FloatPropertyRNA::set, StringPropertyRNA::set, EnumPropertyRNA::set, PointerPropertyRNA::set, BoolPropertyRNA::setarray, IntPropertyRNA::setarray, FloatPropertyRNA::setarray, STREQ, PropertyRNA::type, and PointerPropertyRNA::type.

Referenced by rna_generate().

◆ rna_def_property_funcs_header()

static void rna_def_property_funcs_header ( FILE *  f,
StructRNA srna,
PropertyDefRNA dp 
)
static

◆ rna_def_property_funcs_header_cpp()

static void rna_def_property_funcs_header_cpp ( FILE *  f,
StructRNA srna,
PropertyDefRNA dp 
)
static

◆ rna_def_property_funcs_impl_cpp()

static void rna_def_property_funcs_impl_cpp ( FILE *  f,
StructRNA srna,
PropertyDefRNA dp 
)
static

◆ rna_def_property_get_func()

static char* rna_def_property_get_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA dp,
const char *  manualfunc 
)
static

◆ rna_def_property_length_func()

static char* rna_def_property_length_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA dp,
const char *  manualfunc 
)
static

◆ rna_def_property_lookup_int_func()

static char* rna_def_property_lookup_int_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA dp,
const char *  manualfunc,
const char *  nextfunc 
)
static

◆ rna_def_property_lookup_string_func()

static char* rna_def_property_lookup_string_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA dp,
const char *  manualfunc,
const char *  item_type 
)
static

◆ rna_def_property_next_func()

static char* rna_def_property_next_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA UNUSEDdp,
const char *  manualfunc 
)
static

◆ rna_def_property_search_func()

static char* rna_def_property_search_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA UNUSEDdp,
const char *  manualfunc 
)
static

◆ rna_def_property_set_func()

static char* rna_def_property_set_func ( FILE *  f,
StructRNA srna,
PropertyRNA prop,
PropertyDefRNA dp,
const char *  manualfunc 
)
static

◆ rna_def_property_wrapper_funcs()

static void rna_def_property_wrapper_funcs ( FILE *  f,
StructDefRNA dsrna,
PropertyDefRNA dp 
)
static

◆ rna_def_struct_function_call_impl_cpp()

static void rna_def_struct_function_call_impl_cpp ( FILE *  f,
StructRNA srna,
FunctionDefRNA dfunc 
)
static

◆ rna_def_struct_function_header_cpp()

static void rna_def_struct_function_header_cpp ( FILE *  f,
StructRNA srna,
FunctionDefRNA dfunc 
)
static

◆ rna_def_struct_function_impl_cpp()

static void rna_def_struct_function_impl_cpp ( FILE *  f,
StructRNA srna,
FunctionDefRNA dfunc 
)
static

◆ rna_def_struct_function_prototype_cpp()

static void rna_def_struct_function_prototype_cpp ( FILE *  f,
StructRNA UNUSEDsrna,
FunctionDefRNA dfunc,
const char *  namespace,
int  close_prototype 
)
static

◆ rna_enum_bitmask()

static int rna_enum_bitmask ( PropertyRNA prop)
static

◆ rna_enum_id_from_pointer()

static const char* rna_enum_id_from_pointer ( const EnumPropertyItem item)
static

Return the identifier for an enum which is defined in "RNA_enum_items.h".

Prevents expanding duplicate enums bloating the binary size.

Definition at line 576 of file makesrna.c.

References NULL.

Referenced by rna_generate_property().

◆ rna_find_dna_type()

static const char* rna_find_dna_type ( const char *  type)
static

◆ rna_find_struct()

static StructRNA* rna_find_struct ( const char *  identifier)
static

◆ rna_find_type()

static const char* rna_find_type ( const char *  type)
static

◆ rna_float_print()

static void rna_float_print ( FILE *  f,
float  num 
)
static

Definition at line 593 of file makesrna.c.

References fabsf, and INT64_MAX.

Referenced by rna_clamp_value(), and rna_generate_property().

◆ rna_function_string()

static const char* rna_function_string ( const void func)
static

◆ rna_generate()

static void rna_generate ( BlenderRNA brna,
FILE *  f,
const char *  filename,
const char *  api_filename 
)
static

◆ rna_generate_blender()

static void rna_generate_blender ( BlenderRNA brna,
FILE *  f 
)
static

Definition at line 3353 of file makesrna.c.

References ListBase::first, StructRNA::identifier, ListBase::last, and BlenderRNA::structs.

Referenced by rna_generate().

◆ rna_generate_external_property_prototypes()

static void rna_generate_external_property_prototypes ( BlenderRNA brna,
FILE *  f 
)
static

◆ rna_generate_function_prototypes()

static void rna_generate_function_prototypes ( BlenderRNA brna,
StructRNA srna,
FILE *  f 
)
static

◆ rna_generate_header()

static void rna_generate_header ( BlenderRNA UNUSEDbrna,
FILE *  f 
)
static

◆ rna_generate_header_class_cpp()

static void rna_generate_header_class_cpp ( StructDefRNA ds,
FILE *  f 
)
static

◆ rna_generate_header_cpp()

static void rna_generate_header_cpp ( BlenderRNA UNUSEDbrna,
FILE *  f 
)
static

◆ rna_generate_internal_property_prototypes()

static void rna_generate_internal_property_prototypes ( BlenderRNA UNUSEDbrna,
StructRNA srna,
FILE *  f 
)
static

◆ rna_generate_parameter_prototypes()

static void rna_generate_parameter_prototypes ( BlenderRNA UNUSEDbrna,
StructRNA srna,
FunctionRNA func,
FILE *  f 
)
static

◆ rna_generate_property()

static void rna_generate_property ( FILE *  f,
StructRNA srna,
const char *  nest,
PropertyRNA prop 
)
static

Definition at line 3727 of file makesrna.c.

References PropertyRNA::arraydimension, PropertyRNA::arraylength, CollectionPropertyRNA::assignint, CollectionPropertyRNA::begin, CLOG_ERROR, BoolPropertyRNA::defaultarray, IntPropertyRNA::defaultarray, FloatPropertyRNA::defaultarray, BoolPropertyRNA::defaultvalue, IntPropertyRNA::defaultvalue, FloatPropertyRNA::defaultvalue, StringPropertyRNA::defaultvalue, EnumPropertyRNA::defaultvalue, DefRNA, PropertyRNA::description, EnumPropertyItem::description, DummyRNA_NULL_items, PropertyRNA::editable, CollectionPropertyRNA::end, BlenderDefRNA::error, PropertyRNA::flag, PropertyRNA::flag_internal, PropertyRNA::flag_override, PropertyRNA::flag_parameter, BoolPropertyRNA::get, IntPropertyRNA::get, FloatPropertyRNA::get, StringPropertyRNA::get, EnumPropertyRNA::get, PointerPropertyRNA::get, CollectionPropertyRNA::get, BoolPropertyRNA::get_ex, IntPropertyRNA::get_ex, FloatPropertyRNA::get_ex, StringPropertyRNA::get_ex, EnumPropertyRNA::get_ex, BoolPropertyRNA::getarray, IntPropertyRNA::getarray, FloatPropertyRNA::getarray, BoolPropertyRNA::getarray_ex, IntPropertyRNA::getarray_ex, FloatPropertyRNA::getarray_ex, PropertyRNA::getlength, IntPropertyRNA::hardmax, FloatPropertyRNA::hardmax, IntPropertyRNA::hardmin, FloatPropertyRNA::hardmin, PropertyRNA::icon, EnumPropertyItem::icon, PropertyRNA::identifier, StructRNA::identifier, EnumPropertyItem::identifier, EnumPropertyRNA::item, EnumPropertyRNA::item_fn, CollectionPropertyRNA::item_type, PropertyRNA::itemeditable, len, StringPropertyRNA::length, CollectionPropertyRNA::length, StringPropertyRNA::length_ex, LOG, CollectionPropertyRNA::lookupint, CollectionPropertyRNA::lookupstring, PropertyRNA::magic, StringPropertyRNA::maxlength, MEM_freeN, MEM_mallocN, PropertyRNA::name, EnumPropertyItem::name, PropertyRNA::next, CollectionPropertyRNA::next, PropertyRNA::noteflag, NULL, PropertyRNA::override_apply, PropertyRNA::override_diff, PropertyRNA::override_store, PointerPropertyRNA::poll, FloatPropertyRNA::precision, PropertyRNA::prev, PROP_BOOLEAN, PROP_COLLECTION, PROP_CONTEXT_UPDATE, PROP_ENUM, PROP_ENUM_FLAG, PROP_FLOAT, PROP_INT, PROP_INTERN_PTR_OWNERSHIP_FORCED, PROP_INTERN_RAW_ACCESS, PROP_POINTER, PROP_PTR_NO_OWNERSHIP, PROP_STRING, IntPropertyRNA::range, FloatPropertyRNA::range, IntPropertyRNA::range_ex, FloatPropertyRNA::range_ex, rna_enum_id_from_pointer(), rna_find_struct(), rna_float_print(), rna_function_string(), rna_int_print(), rna_print_c_string(), rna_property_structname(), rna_property_subtype_unit(), rna_property_subtypename(), RNA_property_typename(), rna_set_raw_offset(), StringPropertyRNA::search, StringPropertyRNA::search_flag, BoolPropertyRNA::set, IntPropertyRNA::set, FloatPropertyRNA::set, StringPropertyRNA::set, EnumPropertyRNA::set, PointerPropertyRNA::set, BoolPropertyRNA::set_ex, IntPropertyRNA::set_ex, FloatPropertyRNA::set_ex, StringPropertyRNA::set_ex, EnumPropertyRNA::set_ex, BoolPropertyRNA::setarray, IntPropertyRNA::setarray, FloatPropertyRNA::setarray, BoolPropertyRNA::setarray_ex, IntPropertyRNA::setarray_ex, FloatPropertyRNA::setarray_ex, IntPropertyRNA::softmax, FloatPropertyRNA::softmax, IntPropertyRNA::softmin, FloatPropertyRNA::softmin, PropertyRNA::srna, IntPropertyRNA::step, FloatPropertyRNA::step, STRUCT_ID, PropertyRNA::subtype, PropertyRNA::tags, PropertyRNA::totarraylength, EnumPropertyRNA::totitem, PropertyRNA::translation_context, type, PropertyRNA::type, PointerPropertyRNA::type, PointerPropertyRNA::type_fn, IntPropertyRNA::ui_scale_type, FloatPropertyRNA::ui_scale_type, PropertyRNA::update, and EnumPropertyItem::value.

Referenced by rna_generate_struct().

◆ rna_generate_static_function_prototypes()

static void rna_generate_static_function_prototypes ( BlenderRNA UNUSEDbrna,
StructRNA srna,
FILE *  f 
)
static

◆ rna_generate_static_parameter_prototypes()

static void rna_generate_static_parameter_prototypes ( FILE *  f,
StructRNA srna,
FunctionDefRNA dfunc,
const char *  name_override,
int  close_prototype 
)
static

◆ rna_generate_struct()

static void rna_generate_struct ( BlenderRNA UNUSEDbrna,
StructRNA srna,
FILE *  f 
)
static

◆ rna_generate_struct_prototypes()

static void rna_generate_struct_prototypes ( FILE *  f)
static

◆ rna_generate_struct_rna_prototypes()

static void rna_generate_struct_rna_prototypes ( BlenderRNA brna,
FILE *  f 
)
static

◆ rna_int_print()

static void rna_int_print ( FILE *  f,
int64_t  num 
)
static

◆ rna_is_collection_functions_struct()

static int rna_is_collection_functions_struct ( const char **  collection_structs,
const char *  struct_name 
)
static

Definition at line 5000 of file makesrna.c.

References Freestyle::a, and STREQ.

Referenced by rna_generate_header_cpp().

◆ rna_is_collection_prop()

static int rna_is_collection_prop ( PropertyRNA prop)
static

◆ rna_parameter_type_cpp_name()

static const char* rna_parameter_type_cpp_name ( PropertyRNA prop)
static

◆ rna_parameter_type_name()

static const char* rna_parameter_type_name ( PropertyRNA parm)
static

◆ rna_preprocess()

static int rna_preprocess ( const char *  outfile,
const char *  public_header_outfile 
)
static

◆ rna_print_c_string()

static void rna_print_c_string ( FILE *  f,
const char *  str 
)
static

Definition at line 337 of file makesrna.c.

References NULL, and str.

Referenced by rna_generate_property(), and rna_generate_struct().

◆ rna_print_data_get()

static void rna_print_data_get ( FILE *  f,
PropertyDefRNA dp 
)
static

◆ rna_print_id_get()

static void rna_print_id_get ( FILE *  f,
PropertyDefRNA UNUSEDdp 
)
static

Definition at line 381 of file makesrna.c.

Referenced by rna_def_property_set_func().

◆ rna_property_structname()

static const char* rna_property_structname ( PropertyType  type)
static

◆ rna_property_subtype_unit()

static const char* rna_property_subtype_unit ( PropertySubType  type)
static

◆ rna_property_subtypename()

static const char* rna_property_subtypename ( PropertySubType  type)
static

◆ rna_safe_id()

static const char* rna_safe_id ( const char *  id)
static

◆ rna_set_raw_offset()

static void rna_set_raw_offset ( FILE *  f,
StructRNA srna,
PropertyRNA prop 
)
static

◆ rna_set_raw_property()

static void rna_set_raw_property ( PropertyDefRNA dp,
PropertyRNA prop 
)
static

◆ rna_sort()

static void rna_sort ( BlenderRNA brna)
static

◆ rna_sortlist()

static void rna_sortlist ( ListBase listbase,
int(*)(const void *, const void *)  cmp 
)
static

◆ rna_type_struct()

static const char* rna_type_struct ( PropertyRNA prop)
static

Definition at line 509 of file makesrna.c.

References rna_type_type_name(), and type.

Referenced by rna_def_function_funcs(), and rna_generate_static_parameter_prototypes().

◆ rna_type_type()

static const char* rna_type_type ( PropertyRNA prop)
static

Definition at line 496 of file makesrna.c.

References rna_type_type_name(), and type.

Referenced by rna_def_property_get_func(), and rna_def_property_set_func().

◆ rna_type_type_name()

static const char* rna_type_type_name ( PropertyRNA prop)
static

Variable Documentation

◆ cpp_classes

const char* cpp_classes
static

Definition at line 4652 of file makesrna.c.

Referenced by rna_generate_header_cpp().

◆ debugSRNA

int debugSRNA = 0
static

Variable to control debug output of makesrna. debugSRNA:

  • 0 = no output, except errors
  • 1 = detail actions

Definition at line 44 of file makesrna.c.

Referenced by file_older(), and main().

◆ LOG

CLG_LogRef LOG = {"makesrna"}
static

◆ makesrna_path

const char* makesrna_path = NULL
static

Definition at line 75 of file makesrna.c.

Referenced by main(), and replace_if_different().

◆ PROCESS_ITEMS

RNAProcessItem PROCESS_ITEMS[]
static

Definition at line 4415 of file makesrna.c.

Referenced by rna_preprocess().