Blender V4.3
makesrna.cc File Reference
#include <algorithm>
#include <cerrno>
#include <cfloat>
#include <cinttypes>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <limits>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_system.h"
#include "BLI_utildefines.h"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "RNA_types.hh"
#include "rna_internal.hh"
#include "CLG_log.h"
#include <sys/stat.h>
#include "RNA_enum_items.hh"

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)
 
#define DEF_ENUM(id)   #id,
 

Functions

void BLI_system_backtrace (FILE *fp)
 
static bool file_older (const char *file1, const char *file2)
 
static const char * path_basename (const char *path)
 
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 *)
 
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)
 
void * rna_alloc_from_buffer (const char *buffer, int buffer_size)
 
void * rna_calloc (int buffer_size)
 
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 bool rna_parameter_is_const (const PropertyDefRNA *dparm)
 
static bool rna_color_quantize (PropertyRNA *prop, PropertyDefRNA *dp)
 
static const char * rna_enum_id_from_pointer (const EnumPropertyItem *item)
 
template<typename T >
static const char * rna_function_string (T *func)
 
static void rna_float_print (FILE *f, float num)
 
static const char * rna_ui_scale_type_string (const PropertyScaleType type)
 
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 *, 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 *, const char *manualfunc)
 
static char * rna_def_property_end_func (FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *, 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 *, FunctionDefRNA *dfunc, const char *cpp_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_sanity_checks ()
 
static void rna_auto_types ()
 
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 *, StructRNA *srna, FILE *f)
 
static void rna_generate_parameter_prototypes (BlenderRNA *, 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 *, 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 *, 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 *, FILE *f)
 
static bool rna_is_collection_prop (PropertyRNA *prop)
 
static bool 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 *, 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 = nullptr
 
static RNAProcessItem PROCESS_ITEMS []
 
static const char * cpp_classes
 

Macro Definition Documentation

◆ DEF_ENUM [1/2]

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

◆ DEF_ENUM [2/2]

#define DEF_ENUM ( id)    #id,

◆ 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; \
((void)0)
static CLG_LogRef LOG
Definition makesrna.cc:35

Referenced by replace_if_different().

◆ RNA_MAKESRNA

#define RNA_MAKESRNA

◆ TMP_EXT

#define TMP_EXT   ".tmp"

Definition at line 54 of file makesrna.cc.

Referenced by replace_if_different(), and rna_preprocess().

◆ WRITE_COMMA

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

Definition at line 100 of file makesrna.cc.

Referenced by rna_def_function_wrapper_funcs(), rna_def_struct_function_call_impl_cpp(), and rna_def_struct_function_prototype_cpp().

◆ WRITE_PARAM

#define WRITE_PARAM ( param)
Value:
{ \
fprintf(f, param); \
} \
(void)0
#define WRITE_COMMA
Definition makesrna.cc:100

Definition at line 109 of file makesrna.cc.

Referenced by rna_def_function_wrapper_funcs(), rna_def_struct_function_call_impl_cpp(), and rna_def_struct_function_prototype_cpp().

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 332 of file makesrna.cc.

References 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 324 of file makesrna.cc.

References 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 302 of file makesrna.cc.

References 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 294 of file makesrna.cc.

References b, and StructRNA::identifier.

Referenced by cmp_def_struct(), and rna_sort().

◆ file_older()

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

Definition at line 58 of file makesrna.cc.

References debugSRNA, and printf.

Referenced by replace_if_different().

◆ main()

◆ make_bad_file()

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

Definition at line 5586 of file makesrna.cc.

Referenced by rna_preprocess().

◆ mem_error_cb()

static void mem_error_cb ( const char * errorStr)
static

Definition at line 5792 of file makesrna.cc.

Referenced by main().

◆ path_basename()

static const char * path_basename ( const char * path)
static

Definition at line 76 of file makesrna.cc.

Referenced by replace_if_different().

◆ replace_if_different()

static int replace_if_different ( const char * tmpfile,
const char * dep_files[] )
static
Returns
1 when the file was renamed, 0 when no action was taken, -1 on error.

Definition at line 119 of file makesrna.cc.

References CLOG_ERROR, file_older(), L, LOG, makesrna_path, MEM_freeN(), MEM_mallocN, path_basename(), REN_IF_DIFF, SNPRINTF, STRNCPY, and TMP_EXT.

Referenced by rna_preprocess().

◆ rna_alloc_from_buffer()

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

◆ rna_alloc_function_name()

◆ rna_auto_types()

◆ rna_calloc()

void * rna_calloc ( int buffer_size)

◆ rna_clamp_value()

◆ rna_clamp_value_range()

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

◆ rna_color_quantize()

◆ 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 422 of file makesrna.cc.

References BLI_snprintf().

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()

◆ rna_def_function_funcs_header()

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

◆ rna_def_function_wrapper_funcs()

◆ rna_def_property_begin_func()

◆ rna_def_property_end_func()

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

◆ rna_def_property_funcs()

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

Definition at line 2038 of file makesrna.cc.

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, CollectionPropertyRNA::get, EnumPropertyRNA::get, FloatPropertyRNA::get, IntPropertyRNA::get, PointerPropertyRNA::get, StringPropertyRNA::get, BoolPropertyRNA::getarray, FloatPropertyRNA::getarray, IntPropertyRNA::getarray, BoolPropertyRNA::getarray_ex, FloatPropertyRNA::getarray_ex, IntPropertyRNA::getarray_ex, PropertyRNA::identifier, StructRNA::identifier, CollectionPropertyRNA::item_type, CollectionPropertyRNA::length, StringPropertyRNA::length, LOG, CollectionPropertyRNA::lookupint, CollectionPropertyRNA::lookupstring, CollectionPropertyRNA::next, PropertyDefRNA::prop, PROP_BOOLEAN, PROP_COLLECTION, PROP_EDITABLE, 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, EnumPropertyRNA::set, FloatPropertyRNA::set, IntPropertyRNA::set, PointerPropertyRNA::set, StringPropertyRNA::set, BoolPropertyRNA::set_ex, EnumPropertyRNA::set_ex, FloatPropertyRNA::set_ex, IntPropertyRNA::set_ex, StringPropertyRNA::set_ex, BoolPropertyRNA::setarray, FloatPropertyRNA::setarray, IntPropertyRNA::setarray, BoolPropertyRNA::setarray_ex, FloatPropertyRNA::setarray_ex, IntPropertyRNA::setarray_ex, STREQ, PointerPropertyRNA::type, and PropertyRNA::type.

Referenced by rna_generate().

◆ rna_def_property_funcs_header()

◆ rna_def_property_funcs_header_cpp()

◆ rna_def_property_funcs_impl_cpp()

◆ rna_def_property_get_func()

◆ rna_def_property_length_func()

◆ rna_def_property_lookup_int_func()

◆ 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 * ,
const char * manualfunc )
static

◆ rna_def_property_search_func()

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

◆ rna_def_property_set_func()

◆ 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()

◆ 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()

◆ rna_def_struct_function_prototype_cpp()

◆ rna_enum_bitmask()

◆ 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.hh".

Prevents expanding duplicate enums bloating the binary size.

Definition at line 623 of file makesrna.cc.

Referenced by rna_generate_property().

◆ rna_find_dna_type()

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

◆ rna_find_struct()

◆ 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 640 of file makesrna.cc.

References fabsf, FLT_MAX, and INT64_MAX.

Referenced by rna_clamp_value(), and rna_generate_property().

◆ rna_function_string()

template<typename T >
static const char * rna_function_string ( T * func)
static

◆ rna_generate()

◆ rna_generate_blender()

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

Definition at line 3697 of file makesrna.cc.

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()

◆ rna_generate_header_class_cpp()

◆ rna_generate_header_cpp()

◆ rna_generate_internal_property_prototypes()

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

◆ rna_generate_parameter_prototypes()

static void rna_generate_parameter_prototypes ( BlenderRNA * ,
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 4078 of file makesrna.cc.

References PropertyRNA::arraydimension, PropertyRNA::arraylength, CollectionPropertyRNA::assignint, CollectionPropertyRNA::begin, CLOG_ERROR, BoolPropertyRNA::defaultarray, FloatPropertyRNA::defaultarray, IntPropertyRNA::defaultarray, BoolPropertyRNA::defaultvalue, EnumPropertyRNA::defaultvalue, FloatPropertyRNA::defaultvalue, IntPropertyRNA::defaultvalue, StringPropertyRNA::defaultvalue, DefRNA, EnumPropertyItem::description, PropertyRNA::description, PropertyRNA::editable, CollectionPropertyRNA::end, BlenderDefRNA::error, PropertyRNA::flag, PropertyRNA::flag_internal, PropertyRNA::flag_override, PropertyRNA::flag_parameter, BoolPropertyRNA::get, CollectionPropertyRNA::get, EnumPropertyRNA::get, FloatPropertyRNA::get, IntPropertyRNA::get, PointerPropertyRNA::get, StringPropertyRNA::get, BoolPropertyRNA::get_default, FloatPropertyRNA::get_default, IntPropertyRNA::get_default, BoolPropertyRNA::get_default_array, FloatPropertyRNA::get_default_array, IntPropertyRNA::get_default_array, BoolPropertyRNA::get_ex, EnumPropertyRNA::get_ex, FloatPropertyRNA::get_ex, IntPropertyRNA::get_ex, StringPropertyRNA::get_ex, BoolPropertyRNA::getarray, FloatPropertyRNA::getarray, IntPropertyRNA::getarray, BoolPropertyRNA::getarray_ex, FloatPropertyRNA::getarray_ex, IntPropertyRNA::getarray_ex, PropertyRNA::getlength, FloatPropertyRNA::hardmax, IntPropertyRNA::hardmax, FloatPropertyRNA::hardmin, IntPropertyRNA::hardmin, EnumPropertyItem::icon, PropertyRNA::icon, EnumPropertyItem::identifier, PropertyRNA::identifier, StructRNA::identifier, EnumPropertyRNA::item, EnumPropertyRNA::item_fn, CollectionPropertyRNA::item_type, PropertyRNA::itemeditable, len, CollectionPropertyRNA::length, StringPropertyRNA::length, StringPropertyRNA::length_ex, LOG, CollectionPropertyRNA::lookupint, CollectionPropertyRNA::lookupstring, PropertyRNA::magic, StringPropertyRNA::maxlength, MEM_freeN(), MEM_mallocN, EnumPropertyItem::name, PropertyRNA::name, CollectionPropertyRNA::next, PropertyRNA::next, PropertyRNA::noteflag, 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, FloatPropertyRNA::range, IntPropertyRNA::range, FloatPropertyRNA::range_ex, IntPropertyRNA::range_ex, RNA_def_property_flag(), rna_enum_dummy_NULL_items, 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(), rna_ui_scale_type_string(), StringPropertyRNA::search, StringPropertyRNA::search_flag, BoolPropertyRNA::set, EnumPropertyRNA::set, FloatPropertyRNA::set, IntPropertyRNA::set, PointerPropertyRNA::set, StringPropertyRNA::set, BoolPropertyRNA::set_ex, EnumPropertyRNA::set_ex, FloatPropertyRNA::set_ex, IntPropertyRNA::set_ex, StringPropertyRNA::set_ex, BoolPropertyRNA::setarray, FloatPropertyRNA::setarray, IntPropertyRNA::setarray, BoolPropertyRNA::setarray_ex, FloatPropertyRNA::setarray_ex, IntPropertyRNA::setarray_ex, FloatPropertyRNA::softmax, IntPropertyRNA::softmax, FloatPropertyRNA::softmin, IntPropertyRNA::softmin, PropertyRNA::srna, FloatPropertyRNA::step, IntPropertyRNA::step, STRUCT_ID, PropertyRNA::subtype, PropertyRNA::tags, PropertyRNA::totarraylength, EnumPropertyRNA::totitem, PropertyRNA::translation_context, PointerPropertyRNA::type, PropertyRNA::type, PointerPropertyRNA::type_fn, FloatPropertyRNA::ui_scale_type, IntPropertyRNA::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 * ,
StructRNA * srna,
FILE * f )
static

◆ rna_generate_static_parameter_prototypes()

◆ rna_generate_struct()

◆ rna_generate_struct_prototypes()

◆ 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 bool rna_is_collection_functions_struct ( const char ** collection_structs,
const char * struct_name )
static

Definition at line 5405 of file makesrna.cc.

References STREQ.

Referenced by rna_generate_header_cpp().

◆ rna_is_collection_prop()

static bool rna_is_collection_prop ( PropertyRNA * prop)
static

◆ rna_parameter_is_const()

static bool rna_parameter_is_const ( const PropertyDefRNA * dparm)
static

◆ rna_parameter_type_cpp_name()

static const char * rna_parameter_type_cpp_name ( PropertyRNA * prop)
static

◆ rna_parameter_type_name()

◆ rna_preprocess()

◆ rna_print_c_string()

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

Definition at line 373 of file makesrna.cc.

References str.

Referenced by rna_generate_property(), and rna_generate_struct().

◆ rna_print_data_get()

◆ rna_print_id_get()

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

Definition at line 417 of file makesrna.cc.

Referenced by rna_def_property_set_func().

◆ rna_property_structname()

static const char * rna_property_structname ( PropertyType type)
static

◆ rna_property_subtype_unit()

◆ rna_property_subtypename()

◆ rna_safe_id()

◆ rna_sanity_checks()

static void rna_sanity_checks ( )
static

Definition at line 3439 of file makesrna.cc.

References ARRAY_SIZE, BLI_str_endswith(), BLI_str_startswith(), DefRNA, and BlenderDefRNA::error.

Referenced by rna_preprocess().

◆ rna_set_raw_offset()

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

◆ rna_set_raw_property()

◆ rna_sort()

◆ rna_sortlist()

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

Definition at line 340 of file makesrna.cc.

References ListBase::first, ListBase::last, MEM_freeN(), MEM_mallocN, Link::next, Link::prev, rna_addtail(), and size().

Referenced by rna_sort().

◆ rna_type_struct()

static const char * rna_type_struct ( PropertyRNA * prop)
static

◆ rna_type_type()

static const char * rna_type_type ( PropertyRNA * prop)
static

Definition at line 538 of file makesrna.cc.

References rna_type_type_name().

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

◆ rna_ui_scale_type_string()

static const char * rna_ui_scale_type_string ( const PropertyScaleType type)
static

Variable Documentation

◆ cpp_classes

const char* cpp_classes
static

Definition at line 5055 of file makesrna.cc.

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 43 of file makesrna.cc.

Referenced by file_older(), and main().

◆ LOG

◆ makesrna_path

const char* makesrna_path = nullptr
static

Definition at line 74 of file makesrna.cc.

Referenced by main(), and replace_if_different().

◆ PROCESS_ITEMS

RNAProcessItem PROCESS_ITEMS[]
static

Definition at line 4799 of file makesrna.cc.

Referenced by rna_preprocess().