Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-06-09 15:40:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-09 15:40:09 +0300
commitfb565ddb681f39cbe47e91d11e5b728bb4314a7b (patch)
tree93eba0946d0e65fd3cf16564cb41a0417bb3ba1e /source/blender/makesrna/intern/rna_ui.c
parent56a47e58f4de3f66c2fee827fb2a7883b4f493e9 (diff)
Cleanup: trailing space in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index f0b6f8d5423..7f9a63cc6d1 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -93,7 +93,7 @@ static ARegionType *region_type_find(ReportList *reports, int space_type, int re
if (art->regionid == region_type)
break;
}
-
+
/* region type not found? abort */
if (art == NULL) {
BKE_report(reports, RPT_ERROR, "Region not found in space type");
@@ -175,7 +175,7 @@ static void rna_Panel_unregister(Main *UNUSED(bmain), StructRNA *type)
return;
if (!(art = region_type_find(NULL, pt->space_type, pt->region_type)))
return;
-
+
RNA_struct_free_extension(type, &pt->ext);
RNA_struct_free(&BLENDER_RNA, type);
@@ -205,7 +205,7 @@ static StructRNA *rna_Panel_register(
/* validate the python class */
if (validate(&dummyptr, data, have_function) != 0)
return NULL;
-
+
if (strlen(identifier) >= sizeof(dummypt.idname)) {
BKE_reportf(reports, RPT_ERROR, "Registering panel class: '%s' is too long, maximum length is %d",
identifier, (int)sizeof(dummypt.idname));
@@ -236,7 +236,7 @@ static StructRNA *rna_Panel_register(
if (!RNA_struct_bl_idname_ok_or_report(reports, dummypt.idname, "_PT_")) {
return NULL;
}
-
+
/* create a new panel type */
pt = MEM_callocN(sizeof(PanelType), "python buttons panel");
memcpy(pt, &dummypt, sizeof(dummypt));
@@ -269,7 +269,7 @@ static StructRNA *rna_Panel_register(
/* update while blender is running */
WM_main_add_notifier(NC_WINDOW, NULL);
-
+
return pt->ext.srna;
}
@@ -563,7 +563,7 @@ static void rna_Header_unregister(Main *UNUSED(bmain), StructRNA *type)
return;
if (!(art = region_type_find(NULL, ht->space_type, RGN_TYPE_HEADER)))
return;
-
+
RNA_struct_free_extension(type, &ht->ext);
RNA_struct_free(&BLENDER_RNA, type);
@@ -614,7 +614,7 @@ static StructRNA *rna_Header_register(
if (!RNA_struct_bl_idname_ok_or_report(reports, dummyht.idname, "_HT_")) {
return NULL;
}
-
+
/* create a new header type */
ht = MEM_callocN(sizeof(HeaderType), "python buttons header");
memcpy(ht, &dummyht, sizeof(dummyht));
@@ -631,7 +631,7 @@ static StructRNA *rna_Header_register(
/* update while blender is running */
WM_main_add_notifier(NC_WINDOW, NULL);
-
+
return ht->ext.srna;
}
@@ -692,7 +692,7 @@ static void rna_Menu_unregister(Main *UNUSED(bmain), StructRNA *type)
if (!mt)
return;
-
+
RNA_struct_free_extension(type, &mt->ext);
RNA_struct_free(&BLENDER_RNA, type);
@@ -726,7 +726,7 @@ static StructRNA *rna_Menu_register(
/* validate the python class */
if (validate(&dummymtr, data, have_function) != 0)
return NULL;
-
+
if (strlen(identifier) >= sizeof(dummymt.idname)) {
BKE_reportf(reports, RPT_ERROR, "Registering menu class: '%s' is too long, maximum length is %d",
identifier, (int)sizeof(dummymt.idname));
@@ -744,7 +744,7 @@ static StructRNA *rna_Menu_register(
if (!RNA_struct_bl_idname_ok_or_report(reports, dummymt.idname, "_MT_")) {
return NULL;
}
-
+
/* create a new menu type */
if (_menu_descr[0]) {
description_size = strlen(_menu_descr) + 1;
@@ -777,7 +777,7 @@ static StructRNA *rna_Menu_register(
/* update while blender is running */
WM_main_add_notifier(NC_WINDOW, NULL);
-
+
return mt->ext.srna;
}
@@ -903,7 +903,7 @@ static void rna_def_ui_layout(BlenderRNA *brna)
{UI_LAYOUT_ALIGN_RIGHT, "RIGHT", 0, "Right", ""},
{0, NULL, 0, NULL, NULL}
};
-
+
/* layout */
srna = RNA_def_struct(brna, "UILayout", NULL);
@@ -912,15 +912,15 @@ static void rna_def_ui_layout(BlenderRNA *brna)
prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_active_get", "rna_UILayout_active_set");
-
+
prop = RNA_def_property(srna, "operator_context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_operator_context_items);
RNA_def_property_enum_funcs(prop, "rna_UILayout_op_context_get", "rna_UILayout_op_context_set", NULL);
-
+
prop = RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_enabled_get", "rna_UILayout_enabled_set");
RNA_def_property_ui_text(prop, "Enabled", "When false, this (sub)layout is grayed out");
-
+
prop = RNA_def_property(srna, "alert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_alert_get", "rna_UILayout_alert_set");
@@ -936,7 +936,7 @@ static void rna_def_ui_layout(BlenderRNA *brna)
prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_x_get", "rna_UILayout_scale_x_set", NULL);
RNA_def_property_ui_text(prop, "Scale X", "Scale factor along the X for items in this (sub)layout");
-
+
prop = RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_y_get", "rna_UILayout_scale_y_set", NULL);
RNA_def_property_ui_text(prop, "Scale Y", "Scale factor along the Y for items in this (sub)layout");
@@ -949,7 +949,7 @@ static void rna_def_panel(BlenderRNA *brna)
PropertyRNA *prop;
PropertyRNA *parm;
FunctionRNA *func;
-
+
static const EnumPropertyItem panel_flag_items[] = {
{PNL_DEFAULT_CLOSED, "DEFAULT_CLOSED", 0, "Default Closed",
"Defines if the panel has to be open or collapsed at the time of its creation"},
@@ -958,7 +958,7 @@ static void rna_def_panel(BlenderRNA *brna)
"arrow to collapse the panel and the label (see bl_label)"},
{0, NULL, 0, NULL, NULL}
};
-
+
srna = RNA_def_struct(brna, "Panel", NULL);
RNA_def_struct_ui_text(srna, "Panel", "Panel containing UI elements");
RNA_def_struct_sdna(srna, "Panel");
@@ -991,11 +991,11 @@ static void rna_def_panel(BlenderRNA *brna)
prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "UILayout");
RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the panel in the UI");
-
+
prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "drawname");
RNA_def_property_ui_text(prop, "Text", "XXX todo");
-
+
/* registration */
prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
@@ -1028,7 +1028,7 @@ static void rna_def_panel(BlenderRNA *brna)
RNA_def_property_enum_items(prop, rna_enum_space_type_items);
RNA_def_property_flag(prop, PROP_REGISTER);
RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in");
-
+
prop = RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->region_type");
RNA_def_property_enum_items(prop, rna_enum_region_type_items);
@@ -1041,7 +1041,7 @@ static void rna_def_panel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Context",
"The context in which the panel belongs to. (TODO: explain the "
"possible combinations bl_context/bl_region_type/bl_space_type)");
-
+
prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->flag");
RNA_def_property_enum_items(prop, panel_flag_items);
@@ -1184,7 +1184,7 @@ static void rna_def_header(BlenderRNA *brna)
PropertyRNA *prop;
PropertyRNA *parm;
FunctionRNA *func;
-
+
srna = RNA_def_struct(brna, "Header", NULL);
RNA_def_struct_ui_text(srna, "Header", "Editor header containing UI elements");
RNA_def_struct_sdna(srna, "Header");
@@ -1231,7 +1231,7 @@ static void rna_def_menu(BlenderRNA *brna)
PropertyRNA *prop;
PropertyRNA *parm;
FunctionRNA *func;
-
+
srna = RNA_def_struct(brna, "Menu", NULL);
RNA_def_struct_ui_text(srna, "Menu", "Editor menu containing buttons");
RNA_def_struct_sdna(srna, "Menu");