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_define.h4
-rw-r--r--source/blender/makesrna/RNA_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c2
-rw-r--r--source/blender/makesrna/intern/rna_brush.c16
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c2
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c2
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_material.c30
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c5
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c2
-rw-r--r--source/blender/makesrna/intern/rna_particle.c2
-rw-r--r--source/blender/makesrna/intern/rna_rna.c1
-rw-r--r--source/blender/makesrna/intern/rna_scene.c10
-rw-r--r--source/blender/makesrna/intern/rna_screen.c18
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c2
22 files changed, 77 insertions, 42 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index ee8c1977344..97266028f06 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -25,7 +25,9 @@
/** \file RNA_define.h
* \ingroup RNA
- * Functions used during preprocess and runtime, for defining the RNA. */
+ *
+ * Functions used during preprocess and runtime, for defining the RNA.
+ */
#include <float.h>
#include <limits.h>
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 05a166f4664..0d972a118e8 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -400,7 +400,7 @@ typedef struct ParameterDynAlloc {
typedef enum FunctionFlag {
/***** Options affecting callback signature. *****/
- /* Those add additionnal parameters at the beginning of the C callback, like that:
+ /* Those add additional parameters at the beginning of the C callback, like that:
* rna_my_func([ID *_selfid],
* [<DNA_STRUCT> *self|StructRNA *type],
* [Main *bmain],
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 6335869ca43..bebf232b3b9 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -376,7 +376,7 @@ static struct ID *rna_ID_make_local(struct ID *self, Main *bmain, bool clear_pro
}
-static AnimData * rna_ID_animation_data_create(ID *id, Main *bmain)
+static AnimData *rna_ID_animation_data_create(ID *id, Main *bmain)
{
AnimData *adt = BKE_animdata_add_id(id);
DAG_relations_tag_update(bmain);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index d805d6138a7..51293340a6c 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -6872,7 +6872,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
case PROP_COLLECTION:
{
StructRNA *srna = va_arg(args, StructRNA *);
- ListBase **arg = va_arg(args, ListBase * *);
+ ListBase **arg = va_arg(args, ListBase **);
err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata,
srna, tid, fid, pid);
break;
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 7af3746b855..6c728ac50e5 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -886,7 +886,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
/* calculated and read only, not actual data access */
prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
- /*RNA_def_property_float_sdna(prop, NULL, ""); *//* doesnt access any real data */
+ /*RNA_def_property_float_sdna(prop, NULL, ""); *//* doesn't access any real data */
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
//RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_flag(prop, PROP_THICK_WRAP); /* no reference to original data */
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index bb204bf8c81..1afa462dba8 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1461,16 +1461,16 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Image Painting Capabilities", "Brush's capabilities in image paint mode");
}
-
-/* A brush stroke is a list of changes to the brush that
+/**
+ * A brush stroke is a list of changes to the brush that
* can occur during a stroke
*
- * o 3D location of the brush
- * o 2D mouse location
- * o Tablet pressure
- * o Direction flip
- * o Tool switch
- * o Time
+ * - 3D location of the brush
+ * - 2D mouse location
+ * - Tablet pressure
+ * - Direction flip
+ * - Tool switch
+ * - Time
*/
static void rna_def_operator_stroke_element(BlenderRNA *brna)
{
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index d16ef3db296..c82c95e5a4b 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -127,7 +127,7 @@ static void rna_DynamicPaintSurface_changePreview(Main *bmain, Scene *scene, Poi
DynamicPaintSurface *surface = act_surface->canvas->surfaces.first;
/* since only one color surface can show preview at time
- * disable preview on other surfaces*/
+ * disable preview on other surfaces. */
for (; surface; surface = surface->next) {
if (surface != act_surface)
surface->flags &= ~MOD_DPAINT_PREVIEW;
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 90af65497a4..625ef7db2dc 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -263,7 +263,7 @@ static const EnumPropertyItem *rna_Object_parent_type_itemf(
Object *par = gpl->parent;
if (par->type == OB_ARMATURE) {
- /* special hack: prevents this being overrided */
+ /* special hack: prevents this being overridden */
RNA_enum_items_add_value(&item, &totitem, &parent_type_items[1], PARSKEL);
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARBONE);
}
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index b6ba06a84d5..dc625ca8d9a 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -147,7 +147,7 @@ static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *r
BKE_reportf(reports, RPT_ERROR, "Image '%s' does not have any image data", image->id.name + 2);
}
- BKE_image_release_ibuf(image, ibuf, &lock);
+ BKE_image_release_ibuf(image, ibuf, lock);
WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, image);
}
@@ -243,7 +243,7 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int frame, int f
if (ibuf == NULL || ibuf->rect == NULL) {
BKE_reportf(reports, RPT_ERROR, "Image '%s' does not have any image data", image->id.name + 2);
- BKE_image_release_ibuf(image, ibuf, NULL);
+ BKE_image_release_ibuf(image, ibuf, lock);
return (int)GL_INVALID_OPERATION;
}
@@ -260,7 +260,7 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int frame, int f
image->bindcode[TEXTARGET_TEXTURE_2D] = 0;
}
- BKE_image_release_ibuf(image, ibuf, NULL);
+ BKE_image_release_ibuf(image, ibuf, lock);
return error;
}
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index bbc0c251897..782ca0d76b3 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -103,7 +103,7 @@ static void rna_Lattice_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), P
/* copy settings to editlattice,
* we could split this up differently (one update call per property)
- * but for now thats overkill
+ * but for now that's overkill
*/
static void rna_Lattice_update_data_editlatt(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index bcd8ab054ae..b50102079a9 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -591,7 +591,7 @@ static void rna_def_modifier_type_common(
{LS_VALUE_MULT, "MULTIPLY", 0, "Multiply", ""},
{LS_VALUE_DIV, "DIVIDE", 0, "Divide", ""},
{LS_VALUE_DIFF, "DIFFERENCE", 0, "Difference", ""},
- {LS_VALUE_MIN, "MININUM", 0, "Minimum", ""},
+ {LS_VALUE_MIN, "MINIMUM", 0, "Minimum", ""},
{LS_VALUE_MAX, "MAXIMUM", 0, "Maximum", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 7d619254e07..f2249eb397d 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -1864,7 +1864,8 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop)
/* new func */
func = RNA_def_function(srna, "new", "rna_Main_mask_new");
RNA_def_function_ui_description(func, "Add a new mask with a given name to the main database");
- RNA_def_string_file_path(func, "name", NULL, MAX_ID_NAME - 2, "Mask", "Name of new mask data-block");
+ parm = RNA_def_string(func, "name", NULL, MAX_ID_NAME - 2, "Mask", "Name of new mask data-block");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "mask", "Mask", "", "New mask data-block");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 4947557af10..5bd12d727ed 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -435,6 +435,34 @@ void rna_mtex_texture_slots_clear(ID *self_id, struct bContext *C, ReportList *r
WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C));
}
+static void rna_TexPaintSlot_uv_layer_get(PointerRNA *ptr, char *value)
+{
+ TexPaintSlot *data = (TexPaintSlot *)(ptr->data);
+
+ if (data->uvname != NULL) {
+ BLI_strncpy_utf8(value, data->uvname, 64);
+ }
+ else {
+ value[0] = '\0';
+ }
+}
+
+static int rna_TexPaintSlot_uv_layer_length(PointerRNA *ptr)
+{
+ TexPaintSlot *data = (TexPaintSlot *)(ptr->data);
+ return data->uvname == NULL ? 0 : strlen(data->uvname);
+}
+
+static void rna_TexPaintSlot_uv_layer_set(PointerRNA *ptr, const char *value)
+{
+ TexPaintSlot *data = (TexPaintSlot *)(ptr->data);
+
+ if (data->uvname != NULL) {
+ BLI_strncpy_utf8(data->uvname, value, 64);
+ }
+}
+
+
#else
static void rna_def_material_mtex(BlenderRNA *brna)
@@ -2216,6 +2244,8 @@ static void rna_def_tex_slot(BlenderRNA *brna)
prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_maxlength(prop, 64); /* else it uses the pointer size! */
RNA_def_property_string_sdna(prop, NULL, "uvname");
+ RNA_def_property_string_funcs(prop, "rna_TexPaintSlot_uv_layer_get", "rna_TexPaintSlot_uv_layer_length",
+ "rna_TexPaintSlot_uv_layer_set");
RNA_def_property_ui_text(prop, "UV Map", "Name of UV map");
RNA_def_property_update(prop, NC_GEOM | ND_DATA, "rna_Material_update");
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 847de75c604..68f0272c035 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -6327,11 +6327,6 @@ static void def_cmp_mask(StructRNA *srna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mask", "");
- prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_NODEFLAG_MASK_AA);
- RNA_def_property_ui_text(prop, "Anti-Alias", "Apply an anti-aliasing filter to the mask");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
prop = RNA_def_property(srna, "use_feather", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "custom1", CMP_NODEFLAG_MASK_NO_FEATHER);
RNA_def_property_ui_text(prop, "Feather", "Use feather information from the mask");
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 1d62f438047..4094552d9bc 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -472,7 +472,7 @@ static const EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C),
RNA_enum_items_add_value(&item, &totitem, &parent_type_items[2], PARSKEL);
}
else if (par->type == OB_ARMATURE) {
- /* special hack: prevents this being overrided */
+ /* special hack: prevents this being overridden */
RNA_enum_items_add_value(&item, &totitem, &parent_type_items[1], PARSKEL);
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARBONE);
}
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 376a89c65d1..6218de2469d 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -49,7 +49,7 @@
static const EnumPropertyItem space_items[] = {
{CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space",
- "The most gobal space in Blender"},
+ "The most global space in Blender"},
{CONSTRAINT_SPACE_POSE, "POSE", 0, "Pose Space",
"The pose space of a bone (its armature's object space)"},
{CONSTRAINT_SPACE_PARLOCAL, "LOCAL_WITH_PARENT", 0, "Local With Parent",
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 7da859c000c..c5d66581ca3 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -916,7 +916,7 @@ static void rna_def_pointcache_active(BlenderRNA *brna)
/* This first-level RNA pointer also has list of all caches from owning ID.
* Those caches items have exact same content as 'active' one, except for that collection,
* to prevent ugly recursive layout pattern.
- * Note: This shall probably be redone from scratch in a proper way at some poitn, but for now that will do,
+ * Note: This shall probably be redone from scratch in a proper way at some point, but for now that will do,
* and shall not break anything in the API. */
prop = RNA_def_property(srna, "point_caches", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", "rna_iterator_listbase_next",
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index a2286f0b92a..05fd0ee740e 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1528,7 +1528,7 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Keyed States", "");
/* */
/* float fuv[4], foffset; *//* coordinates on face/edge number "num" and depth along*/
-/* *//* face normal for volume emission */
+/* *//* face normal for volume emission */
prop = RNA_def_property(srna, "birth_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 7eb48272c56..b8a9e9f92cd 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -121,6 +121,7 @@ const EnumPropertyItem rna_enum_property_unit_items[] = {
{PROP_UNIT_TIME, "TIME", 0, "Time", ""},
{PROP_UNIT_VELOCITY, "VELOCITY", 0, "Velocity", ""},
{PROP_UNIT_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""},
+ {PROP_UNIT_MASS, "MASS", 0, "Mass", ""},
{PROP_UNIT_CAMERA, "CAMERA", 0, "Camera", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 3c8cc9ee2be..d6c45fd69d0 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -5498,11 +5498,11 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
#endif
static const EnumPropertyItem audio_channel_items[] = {
- {1, "MONO", 0, "Mono", "Set audio channels to mono"},
- {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
- {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
- {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
- {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
+ {FFM_CHANNELS_MONO, "MONO", 0, "Mono", "Set audio channels to mono"},
+ {FFM_CHANNELS_STEREO, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
+ {FFM_CHANNELS_SURROUND4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
+ {FFM_CHANNELS_SURROUND51, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
+ {FFM_CHANNELS_SURROUND71, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 7ca26ab1c9f..0a997ca2163 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -209,11 +209,21 @@ static void rna_def_area_spaces(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_ui_text(prop, "Active Space", "Space currently being displayed in this area");
}
+static void rna_def_area_api(StructRNA *srna)
+{
+ FunctionRNA *func;
+
+ RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw");
+
+ func = RNA_def_function(srna, "header_text_set", "ED_area_headerprint");
+ RNA_def_function_ui_description(func, "Set the header text");
+ RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text");
+}
+
static void rna_def_area(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- FunctionRNA *func;
srna = RNA_def_struct(brna, "Area", NULL);
RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor");
@@ -267,11 +277,7 @@ static void rna_def_area(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Height", "Area height");
- RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw");
-
- func = RNA_def_function(srna, "header_text_set", "ED_area_headerprint");
- RNA_def_function_ui_description(func, "Set the header text");
- RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text");
+ rna_def_area_api(srna);
}
static void rna_def_view2d_api(StructRNA *srna)
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index dc13ef3d163..3015d56e1ee 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -253,7 +253,7 @@ static void rna_KeyMap_item_remove(wmKeyMap *km, ReportList *reports, PointerRNA
static wmKeyMap *rna_keymap_new(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid, bool modal)
{
if (modal == 0) {
- return WM_keymap_find(keyconf, idname, spaceid, regionid);
+ return WM_keymap_ensure(keyconf, idname, spaceid, regionid);
}
else {
return WM_modalkeymap_add(keyconf, idname, NULL); /* items will be lazy init */