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.
This commit is contained in:
@@ -101,8 +101,8 @@ fail:
|
||||
|
||||
static void gizmo_properties_init(wmGizmoType *gzt)
|
||||
{
|
||||
PyTypeObject *py_class = gzt->ext.data;
|
||||
RNA_struct_blender_type_set(gzt->ext.srna, gzt);
|
||||
PyTypeObject *py_class = gzt->rna_ext.data;
|
||||
RNA_struct_blender_type_set(gzt->rna_ext.srna, gzt);
|
||||
|
||||
/* only call this so pyrna_deferred_register_class gives a useful error
|
||||
* WM_operatortype_append_ptr will call RNA_def_struct_identifier
|
||||
@@ -160,9 +160,9 @@ void BPY_RNA_gizmo_wrapper(wmGizmoType *gzt, void *userdata)
|
||||
|
||||
/* don't do translations here yet */
|
||||
#if 0
|
||||
/* Use i18n context from ext.srna if possible (py gizmogroups). */
|
||||
if (gt->ext.srna) {
|
||||
RNA_def_struct_translation_context(gt->srna, RNA_struct_translation_context(gt->ext.srna));
|
||||
/* Use i18n context from rna_ext.srna if possible (py gizmogroups). */
|
||||
if (gt->rna_ext.srna) {
|
||||
RNA_def_struct_translation_context(gt->srna, RNA_struct_translation_context(gt->rna_ext.srna));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -179,8 +179,8 @@ void BPY_RNA_gizmo_wrapper(wmGizmoType *gzt, void *userdata)
|
||||
|
||||
static void gizmogroup_properties_init(wmGizmoGroupType *gzgt)
|
||||
{
|
||||
PyTypeObject *py_class = gzgt->ext.data;
|
||||
RNA_struct_blender_type_set(gzgt->ext.srna, gzgt);
|
||||
PyTypeObject *py_class = gzgt->rna_ext.data;
|
||||
RNA_struct_blender_type_set(gzgt->rna_ext.srna, gzgt);
|
||||
|
||||
/* only call this so pyrna_deferred_register_class gives a useful error
|
||||
* WM_operatortype_append_ptr will call RNA_def_struct_identifier
|
||||
@@ -203,9 +203,9 @@ void BPY_RNA_gizmogroup_wrapper(wmGizmoGroupType *gzgt, void *userdata)
|
||||
|
||||
/* don't do translations here yet */
|
||||
#if 0
|
||||
/* Use i18n context from ext.srna if possible (py gizmogroups). */
|
||||
if (gzgt->ext.srna) {
|
||||
RNA_def_struct_translation_context(gzgt->srna, RNA_struct_translation_context(gzgt->ext.srna));
|
||||
/* Use i18n context from rna_ext.srna if possible (py gizmogroups). */
|
||||
if (gzgt->rna_ext.srna) {
|
||||
RNA_def_struct_translation_context(gzgt->srna, RNA_struct_translation_context(gzgt->rna_ext.srna));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -39,8 +39,8 @@
|
||||
|
||||
static void operator_properties_init(wmOperatorType *ot)
|
||||
{
|
||||
PyTypeObject *py_class = ot->ext.data;
|
||||
RNA_struct_blender_type_set(ot->ext.srna, ot);
|
||||
PyTypeObject *py_class = ot->rna_ext.data;
|
||||
RNA_struct_blender_type_set(ot->rna_ext.srna, ot);
|
||||
|
||||
/* Only call this so pyrna_deferred_register_class gives a useful error
|
||||
* WM_operatortype_append_ptr will call RNA_def_struct_identifier later.
|
||||
@@ -123,9 +123,9 @@ void BPY_RNA_operator_wrapper(wmOperatorType *ot, void *userdata)
|
||||
*ot = *((wmOperatorType *)userdata);
|
||||
ot->srna = srna; /* restore */
|
||||
|
||||
/* Use i18n context from ext.srna if possible (py operators). */
|
||||
if (ot->ext.srna) {
|
||||
RNA_def_struct_translation_context(ot->srna, RNA_struct_translation_context(ot->ext.srna));
|
||||
/* Use i18n context from rna_ext.srna if possible (py operators). */
|
||||
if (ot->rna_ext.srna) {
|
||||
RNA_def_struct_translation_context(ot->srna, RNA_struct_translation_context(ot->rna_ext.srna));
|
||||
}
|
||||
|
||||
operator_properties_init(ot);
|
||||
@@ -142,11 +142,11 @@ void BPY_RNA_operator_macro_wrapper(wmOperatorType *ot, void *userdata)
|
||||
ot->flag |= data->flag; /* append flags to the one set by registration */
|
||||
ot->pyop_poll = data->pyop_poll;
|
||||
ot->ui = data->ui;
|
||||
ot->ext = data->ext;
|
||||
ot->rna_ext = data->rna_ext;
|
||||
|
||||
/* Use i18n context from ext.srna if possible (py operators). */
|
||||
if (ot->ext.srna) {
|
||||
RNA_def_struct_translation_context(ot->srna, RNA_struct_translation_context(ot->ext.srna));
|
||||
/* Use i18n context from rna_ext.srna if possible (py operators). */
|
||||
if (ot->rna_ext.srna) {
|
||||
RNA_def_struct_translation_context(ot->srna, RNA_struct_translation_context(ot->rna_ext.srna));
|
||||
}
|
||||
|
||||
operator_properties_init(ot);
|
||||
|
@@ -4091,7 +4091,7 @@ static PyObject *pyrna_struct_bl_rna_get_subclass(PyObject *cls, PyObject *args)
|
||||
if (srna_base == &RNA_Node) {
|
||||
bNodeType *nt = nodeTypeFind(id);
|
||||
if (nt) {
|
||||
RNA_pointer_create(NULL, &RNA_Struct, nt->ext.srna, &ptr);
|
||||
RNA_pointer_create(NULL, &RNA_Struct, nt->rna_ext.srna, &ptr);
|
||||
return pyrna_struct_CreatePyObject(&ptr);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user