RNA: move remaining rna files to C++

Also see #103343.

Pull Request: https://projects.blender.org/blender/blender/pulls/110354
This commit is contained in:
Jacques Lucke
2023-07-21 21:08:05 +02:00
parent 5b2accd26f
commit febe38743c
20 changed files with 1374 additions and 3653 deletions
@@ -11,7 +11,7 @@
* - When renaming the member of a struct which has itself been renamed
* refer to the newer name, not the original.
*
* - Changes here only change generated code for `makesdna.cc` and `makesrna.c`
* - Changes here only change generated code for `makesdna.cc` and `makesrna.cc`
* without impacting Blender's run-time, besides allowing us to use the new names.
*
* - Renaming something that has already been renamed can be done
+1 -1
View File
@@ -123,7 +123,7 @@ typedef enum PropertyScaleType {
#define RNA_STACK_ARRAY 32
/**
* \note Also update enums in bpy_props.c and rna_rna.c when adding items here.
* \note Also update enums in bpy_props.c and rna_rna.cc when adding items here.
* Watch it: these values are written to files as part of node socket button sub-types!
*/
typedef enum PropertySubType {
@@ -12,9 +12,9 @@ if(HAVE_MALLOC_STATS_H)
add_definitions(-DHAVE_MALLOC_STATS_H)
endif()
# files rna_access.cc rna_define.c makesrna.c intentionally excluded.
# files rna_access.cc rna_define.cc makesrna.cc intentionally excluded.
set(DEFSRC
rna_ID.c
rna_ID.cc
rna_action.cc
rna_animation.cc
rna_animviz.cc
@@ -64,8 +64,8 @@ set(DEFSRC
rna_pointcloud.cc
rna_pose.cc
rna_render.cc
rna_rigidbody.c
rna_rna.c
rna_rigidbody.cc
rna_rna.cc
rna_scene.cc
rna_screen.cc
rna_sculpt_paint.cc
@@ -198,8 +198,8 @@ set(SRC_RNA_INC
)
set(SRC
makesrna.c
rna_define.c
makesrna.cc
rna_define.cc
${DEFSRC}
${APISRC}
../../../../intern/clog/clog.c
@@ -490,4 +490,3 @@ set(LIB
)
blender_add_lib(bf_rna "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1874,7 +1874,7 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
RNA_def_property_collection_funcs(prop,
nullptr,
nullptr,
+1 -1
View File
@@ -461,7 +461,7 @@ static void rna_def_curves(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
RNA_def_property_collection_funcs(prop,
nullptr,
nullptr,
@@ -2474,7 +2474,7 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
RNA_def_property_collection_funcs(prop,
nullptr,
nullptr,
@@ -505,7 +505,7 @@ typedef struct CollectionPropertyRNA {
struct StructRNA *item_type; /* the type of this item */
} CollectionPropertyRNA;
/* changes to this struct require updating rna_generate_struct in makesrna.c */
/* changes to this struct require updating rna_generate_struct in makesrna.cc */
struct StructRNA {
/* structs are containers of properties */
ContainerRNA cont;
+1 -1
View File
@@ -2620,7 +2620,7 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_override_funcs(prop, nullptr, nullptr, "rna_Mesh_materials_override_apply");
RNA_def_property_collection_funcs(prop,
+1 -1
View File
@@ -398,7 +398,7 @@ static void rna_def_metaball(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
RNA_def_property_collection_funcs(prop,
nullptr,
nullptr,
@@ -194,7 +194,7 @@ static void rna_def_pointcloud(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
RNA_def_property_collection_funcs(prop,
nullptr,
nullptr,
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -25,7 +25,7 @@
# include "WM_api.h"
/* Matching function in rna_ID.c */
/* Matching function in rna_ID.cc */
static int rna_VectorFont_filepath_editable(PointerRNA *ptr, const char ** /*r_info*/)
{
VFont *vfont = (VFont *)ptr->owner_id;
+1 -1
View File
@@ -634,7 +634,7 @@ static void rna_def_volume(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
RNA_def_property_collection_funcs(prop,
nullptr,
nullptr,
@@ -39,7 +39,7 @@
static bool bpy_gizmotype_target_property_def(wmGizmoType *gzt, PyObject *item)
{
/* NOTE: names based on `rna_rna.c`. */
/* NOTE: names based on `rna_rna.cc`. */
PyObject *empty_tuple = PyTuple_New(0);
struct {
+1 -1
View File
@@ -3326,7 +3326,7 @@ static PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject
const char *translation_context = nullptr;
int min = INT_MIN, max = INT_MAX, soft_min = INT_MIN, soft_max = INT_MAX;
int step = 1;
int default_value[RNA_MAX_ARRAY_DIMENSION][PYRNA_STACK_ARRAY] = {0};
int default_value[RNA_MAX_ARRAY_DIMENSION][PYRNA_STACK_ARRAY] = {};
BPyPropArrayLength array_len_info{};
array_len_info.len_total = 3;
PropertyRNA *prop;