[Bf-blender-cvs] [63922c5056d] master: Cleanup: Rename ExtensionRNA variables from ext to rna_ext
Julian Eisel
noreply at git.blender.org
Fri Apr 3 18:26:44 CEST 2020
Commit: 63922c5056d16cc91c30ec3476a28d523adbdbea
Author: Julian Eisel
Date: Fri Apr 3 18:24:08 2020 +0200
Branches: master
https://developer.blender.org/rB63922c5056d16cc91c30ec3476a28d523adbdbea
Cleanup: Rename ExtensionRNA variables from ext to rna_ext
Makes it more clear that code using this is related to the RNA
integration of a type.
Part of T74432.
Also ran clang-format on affected files.
===================================================================
M source/blender/blenkernel/BKE_addon.h
M source/blender/blenkernel/BKE_keyconfig.h
M source/blender/blenkernel/BKE_node.h
M source/blender/blenkernel/BKE_screen.h
M source/blender/blenkernel/intern/node.c
M source/blender/blenkernel/intern/screen.c
M source/blender/editors/animation/keyingsets.c
M source/blender/editors/include/ED_keyframing.h
M source/blender/editors/interface/interface.c
M source/blender/editors/space_node/drawnode.c
M source/blender/editors/space_script/script_edit.c
M source/blender/makesrna/RNA_define.h
M source/blender/makesrna/intern/rna_animation.c
M source/blender/makesrna/intern/rna_define.c
M source/blender/makesrna/intern/rna_nodetree.c
M source/blender/makesrna/intern/rna_render.c
M source/blender/makesrna/intern/rna_ui.c
M source/blender/makesrna/intern/rna_userdef.c
M source/blender/makesrna/intern/rna_wm.c
M source/blender/makesrna/intern/rna_wm_gizmo.c
M source/blender/nodes/composite/node_composite_tree.c
M source/blender/nodes/composite/nodes/node_composite_common.c
M source/blender/nodes/shader/node_shader_tree.c
M source/blender/nodes/shader/nodes/node_shader_common.c
M source/blender/nodes/texture/node_texture_tree.c
M source/blender/nodes/texture/nodes/node_texture_common.c
M source/blender/python/intern/bpy_gizmo_wrap.c
M source/blender/python/intern/bpy_operator_wrap.c
M source/blender/python/intern/bpy_rna.c
M source/blender/render/extern/include/RE_engine.h
M source/blender/render/intern/source/external_engine.c
M source/blender/windowmanager/WM_types.h
M source/blender/windowmanager/gizmo/WM_gizmo_types.h
M source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c
M source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c
M source/blender/windowmanager/intern/wm_menu_type.c
M source/blender/windowmanager/intern/wm_operator_type.c
M source/blender/windowmanager/intern/wm_uilist_type.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_addon.h b/source/blender/blenkernel/BKE_addon.h
index 7bb1761dfbe..741be17bb25 100644
--- a/source/blender/blenkernel/BKE_addon.h
+++ b/source/blender/blenkernel/BKE_addon.h
@@ -33,7 +33,7 @@ typedef struct bAddonPrefType {
char idname[64]; // best keep the same size as BKE_ST_MAXNAME
/* RNA integration */
- ExtensionRNA ext;
+ ExtensionRNA rna_ext;
} bAddonPrefType;
#else
diff --git a/source/blender/blenkernel/BKE_keyconfig.h b/source/blender/blenkernel/BKE_keyconfig.h
index 711d0292f75..bc33cc2669e 100644
--- a/source/blender/blenkernel/BKE_keyconfig.h
+++ b/source/blender/blenkernel/BKE_keyconfig.h
@@ -37,7 +37,7 @@ typedef struct wmKeyConfigPrefType_Runtime {
char idname[64];
/* RNA integration */
- ExtensionRNA ext;
+ ExtensionRNA rna_ext;
} wmKeyConfigPrefType_Runtime;
#else
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index dc06f56861a..38fe974c228 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -268,7 +268,7 @@ typedef struct bNodeType {
NodeGPUExecFunction gpufunc;
/* RNA integration */
- ExtensionRNA ext;
+ ExtensionRNA rna_ext;
} bNodeType;
/* nodetype->nclass, for add-menu and themes */
@@ -350,7 +350,7 @@ typedef struct bNodeTreeType {
void (*node_add_init)(struct bNodeTree *ntree, struct bNode *bnode);
/* RNA integration */
- ExtensionRNA ext;
+ ExtensionRNA rna_ext;
} bNodeTreeType;
/** \} */
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index a3ff5c53828..d70718b4387 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -233,7 +233,7 @@ typedef struct PanelType {
ListBase children;
/* RNA integration */
- ExtensionRNA ext;
+ ExtensionRNA rna_ext;
} PanelType;
/* uilist types */
@@ -271,7 +271,7 @@ typedef struct uiListType {
uiListFilterItemsFunc filter_items;
/* RNA integration */
- ExtensionRNA ext;
+ ExtensionRNA rna_ext;
} uiListType;
/* header types */
@@ -288,7 +288,7 @@ typedef struct HeaderType {
void (*draw)(const struct bContext *C, struct Header *header);
/* RNA integration */
- ExtensionRNA ext;
+ ExtensionRNA rna_ext;
} HeaderType;
typedef struct Header {
@@ -313,7 +313,7 @@ typedef struct MenuType {
void (*draw)(const struct bContext *C, struct Menu *menu);
/* RNA integration */
- ExtensionRNA ext;
+ ExtensionRNA rna_ext;
} MenuType;
typedef struct Menu {
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index de5f9d34f6c..98a7673c9d5 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -3625,9 +3625,9 @@ void node_type_base(bNodeType *ntype, int type, const char *name, short nclass,
#define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
case ID: \
BLI_strncpy(ntype->idname, #Category #StructName, sizeof(ntype->idname)); \
- ntype->ext.srna = RNA_struct_find(#Category #StructName); \
- BLI_assert(ntype->ext.srna != NULL); \
- RNA_struct_blender_type_set(ntype->ext.srna, ntype); \
+ ntype->rna_ext.srna = RNA_struct_find(#Category #StructName); \
+ BLI_assert(ntype->rna_ext.srna != NULL); \
+ RNA_struct_blender_type_set(ntype->rna_ext.srna, ntype); \
break;
switch (type) {
@@ -4142,8 +4142,8 @@ void free_nodesystem(void)
{
if (nodetypes_hash) {
NODE_TYPES_BEGIN (nt) {
- if (nt->ext.free) {
- nt->ext.free(nt->ext.data);
+ if (nt->rna_ext.free) {
+ nt->rna_ext.free(nt->rna_ext.data);
}
}
NODE_TYPES_END;
@@ -4169,8 +4169,8 @@ void free_nodesystem(void)
if (nodetreetypes_hash) {
NODE_TREE_TYPES_BEGIN (nt) {
- if (nt->ext.free) {
- nt->ext.free(nt->ext.data);
+ if (nt->rna_ext.free) {
+ nt->rna_ext.free(nt->rna_ext.data);
}
}
NODE_TREE_TYPES_END;
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 7ad08dc1ad5..37ea6c2cb4d 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -104,16 +104,16 @@ static void spacetype_free(SpaceType *st)
BLI_freelistN(&art->drawcalls);
for (pt = art->paneltypes.first; pt; pt = pt->next) {
- if (pt->ext.free) {
- pt->ext.free(pt->ext.data);
+ if (pt->rna_ext.free) {
+ pt->rna_ext.free(pt->rna_ext.data);
}
BLI_freelistN(&pt->children);
}
for (ht = art->headertypes.first; ht; ht = ht->next) {
- if (ht->ext.free) {
- ht->ext.free(ht->ext.data);
+ if (ht->rna_ext.free) {
+ ht->rna_ext.free(ht->rna_ext.data);
}
}
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index d30d03a1c73..89c7860982b 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -646,8 +646,8 @@ void ANIM_keyingset_infos_exit(void)
next = ksi->next;
/* free extra RNA data, and remove from list */
- if (ksi->ext.free) {
- ksi->ext.free(ksi->ext.data);
+ if (ksi->rna_ext.free) {
+ ksi->rna_ext.free(ksi->rna_ext.data);
}
BLI_freelinkN(&keyingset_type_infos, ksi);
}
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 6cac3e60531..b362d35c09a 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -198,7 +198,7 @@ typedef struct KeyingSetInfo {
cbKeyingSet_Generate generate;
/* RNA integration */
- struct ExtensionRNA ext;
+ struct ExtensionRNA rna_ext;
} KeyingSetInfo;
/* -------- */
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 78db23a380a..11dc8b3b8b4 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -6607,8 +6607,8 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
}
else {
/* Not all menus are from Python. */
- if (mt->ext.srna) {
- const char *t = RNA_struct_ui_description(mt->ext.srna);
+ if (mt->rna_ext.srna) {
+ const char *t = RNA_struct_ui_description(mt->rna_ext.srna);
if (t && t[0]) {
tmp = BLI_strdup(t);
}
@@ -6625,7 +6625,7 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
}
else {
/* Not all panels are from Python. */
- if (pt->ext.srna) {
+ if (pt->rna_ext.srna) {
/* Panels don't yet have descriptions, this may be added. */
}
}
@@ -6644,7 +6644,7 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
else if (ELEM(but->type, UI_BTYPE_MENU, UI_BTYPE_PULLDOWN)) {
MenuType *mt = UI_but_menutype_get(but);
if (mt) {
- _tmp = RNA_struct_translation_context(mt->ext.srna);
+ _tmp = RNA_struct_translation_context(mt->rna_ext.srna);
}
}
if (BLT_is_default_context(_tmp)) {
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 55a5a043014..e5ca2efb26f 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3133,7 +3133,7 @@ static void node_property_update_default(Main *bmain, Scene *UNUSED(scene), Poin
static void node_socket_template_properties_update(bNodeType *ntype, bNodeSocketTemplate *stemp)
{
- StructRNA *srna = ntype->ext.srna;
+ StructRNA *srna = ntype->rna_ext.srna;
PropertyRNA *prop = RNA_struct_type_find_property(srna, stemp->identifier);
if (prop) {
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 79311cac6b5..e9ed1cec228 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -92,7 +92,7 @@ static bool script_test_modal_operators(bContext *C)
wmEventHandler_Op *handler = (wmEventHandler_Op *)handler_base;
if (handler->op != NULL) {
wmOperatorType *ot = handler->op->type;
- if (ot->ext.srna) {
+ if (ot->rna_ext.srna) {
return true;
}
}
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index 558e490a16e..7a7ab1085dd 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -76,7 +76,7 @@ void RNA_def_struct_identifier_no_struct_map(StructRNA *srna, const char *identi
void RNA_def_struct_identifier(BlenderRNA *brna, StructRNA *srna, const char *identifier);
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description);
void RNA_def_struct_ui_icon(StructRNA *srna, int icon);
-void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *ext);
+void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *rna_ext);
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna);
void RNA_def_struct_translation_context(StructRNA *srna, const char *context);
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 86391bdc40d..7ea44bce6db 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -194,7 +194,7 @@ static bool RKS_POLL_rna_internal(KeyingSetInfo *ksi, bContext *C)
void *ret;
int ok;
- RNA_pointer_create(NULL, ksi->ext.srna, ksi, &ptr);
+ RNA_pointer_create(NULL, ksi->rna_ext.srna, ksi, &ptr);
func = &rna_KeyingSetInfo_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
RNA_parameter_list_create(&list, &ptr, func);
@@ -204,7 +204,7 @@ static bool RKS_POLL_rna_internal(KeyingSetInfo *ksi, bContext *C)
RNA_parameter_set_lookup(&list, "context", &C);
/* execute the function *
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list