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:
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h6
-rw-r--r--source/blender/makesrna/intern/rna_access.c4
-rw-r--r--source/blender/makesrna/intern/rna_curve.c4
-rw-r--r--source/blender/makesrna/intern/rna_define.c6
-rw-r--r--source/blender/makesrna/intern/rna_rna.c6
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_wm.c6
-rw-r--r--source/blender/makesrna/intern/rna_wm_gizmo.c7
8 files changed, 26 insertions, 16 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 30e24917b83..b0738b617f7 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -953,8 +953,10 @@ bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *v
bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop);
bool RNA_property_editable_info(PointerRNA *ptr, PropertyRNA *prop, const char **r_info);
bool RNA_property_editable_index(PointerRNA *ptr, PropertyRNA *prop, int index);
-bool RNA_property_editable_flag(PointerRNA *ptr,
- PropertyRNA *prop); /* without lib check, only checks the flag */
+
+/* without lib check, only checks the flag */
+bool RNA_property_editable_flag(PointerRNA *ptr, PropertyRNA *prop);
+
bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop);
bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop);
bool RNA_property_overridable_get(PointerRNA *ptr, PropertyRNA *prop);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 3e4cb96a8e8..330d45c2fa5 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -6477,8 +6477,8 @@ char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, in
PropertyRNA *prop = RNA_struct_find_property(ptr, name);
if (prop) {
- return RNA_property_string_get_alloc(
- ptr, prop, fixedbuf, fixedlen, NULL); /* TODO, pass length */
+ /* TODO, pass length */
+ return RNA_property_string_get_alloc(ptr, prop, fixedbuf, fixedlen, NULL);
}
else {
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 310a335ba4c..644d0b712a2 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -1215,8 +1215,8 @@ static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna)
RNA_def_property_ui_text(prop, "Body Text", "Content of this text object");
RNA_def_property_string_funcs(
prop, "rna_Curve_body_get", "rna_Curve_body_length", "rna_Curve_body_set");
- RNA_def_property_string_maxlength(prop,
- 8192); /* note that originally str did not have a limit! */
+ /* note that originally str did not have a limit! */
+ RNA_def_property_string_maxlength(prop, 8192);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop = RNA_def_property(srna, "body_format", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 2cb7c62b028..03ab9da2eff 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -724,8 +724,10 @@ void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *ext)
#ifdef RNA_RUNTIME
ext->free(ext->data); /* decref's the PyObject that the srna owns */
RNA_struct_blender_type_set(srna, NULL); /* this gets accessed again - XXX fixme */
- RNA_struct_py_type_set(
- srna, NULL); /* NULL the srna's value so RNA_struct_free wont complain of a leak */
+
+ /* NULL the srna's value so RNA_struct_free wont complain of a leak */
+ RNA_struct_py_type_set(srna, NULL);
+
#else
(void)srna;
(void)ext;
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index f17e9ce28fe..631ad72e146 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -2824,8 +2824,10 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type)
prop = RNA_def_property(srna, "default_array", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_array(
- prop, RNA_MAX_ARRAY_DIMENSION); /* no fixed default length, important its not 0 though */
+
+ /* no fixed default length, important its not 0 though. */
+ RNA_def_property_array(prop, RNA_MAX_ARRAY_DIMENSION);
+
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(
prop, "rna_NumberProperty_default_array_get_length"); /* same for all types */
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index d50f97e88ca..c8b039bd2d6 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -796,6 +796,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, not just the icon/text");
RNA_def_int(func,
"index",
+ /* RNA_NO_INDEX == -1 */
-1,
-2,
INT_MAX,
@@ -803,7 +804,7 @@ void RNA_api_ui_layout(StructRNA *srna)
"The index of this button, when set a single member of an array can be accessed, "
"when set to -1 all array members are used",
-2,
- INT_MAX); /* RNA_NO_INDEX == -1 */
+ INT_MAX);
parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item");
RNA_def_boolean(func, "invert_checkbox", false, "", "Draw checkbox value inverted");
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 1edda29a556..123ec9634c9 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -1514,8 +1514,10 @@ static StructRNA *rna_Operator_register(Main *bmain,
/* create a new operator type */
dummyot.ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, dummyot.idname, &RNA_Operator);
- RNA_def_struct_flag(dummyot.ext.srna,
- STRUCT_NO_IDPROPERTIES); /* operator properties are registered separately */
+
+ /* Operator properties are registered separately. */
+ RNA_def_struct_flag(dummyot.ext.srna, STRUCT_NO_IDPROPERTIES);
+
RNA_def_struct_property_tags(dummyot.ext.srna, rna_enum_operator_property_tags);
RNA_def_struct_translation_context(dummyot.ext.srna, dummyot.translation_context);
dummyot.ext.data = data;
diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c
index 38b6ac9ac52..534e3042768 100644
--- a/source/blender/makesrna/intern/rna_wm_gizmo.c
+++ b/source/blender/makesrna/intern/rna_wm_gizmo.c
@@ -870,9 +870,10 @@ static StructRNA *rna_GizmoGroup_register(Main *bmain,
/* create a new gizmogroup type */
dummywgt.ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, dummywgt.idname, &RNA_GizmoGroup);
- RNA_def_struct_flag(
- dummywgt.ext.srna,
- STRUCT_NO_IDPROPERTIES); /* gizmogroup properties are registered separately */
+
+ /* Gizmo group properties are registered separately. */
+ RNA_def_struct_flag(dummywgt.ext.srna, STRUCT_NO_IDPROPERTIES);
+
dummywgt.ext.data = data;
dummywgt.ext.call = call;
dummywgt.ext.free = free;