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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-06-15 00:16:04 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-06-15 00:21:12 +0300
commit23254ce4ee6b21b202549b421cf1d98f6a03b33d (patch)
tree77ebd72c7f1cd2776e058f04b5e6e49f14a327ec /source/blender/makesrna/intern/rna_ID.c
parentf64070185808f153d141b26e63942424a1b258b1 (diff)
Cleanup: Rename: Static Override -> Library Override.
Better to make internal code naming match official/UI naming to some extent, this will reduce confusion in the future. This is 'breaking' scripts and files that would use that feature, but since it is not yet officially supported nor exposed in 2.80, as far as that release is concerned, it is effectively a 'no functional changes' commit.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c88
1 files changed, 44 insertions, 44 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index a1144378f09..57cdbbadeb8 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -103,27 +103,27 @@ const EnumPropertyItem rna_enum_id_type_items[] = {
# include "WM_api.h"
-void rna_ID_override_static_property_operation_refname_get(PointerRNA *ptr, char *value)
+void rna_ID_override_library_property_operation_refname_get(PointerRNA *ptr, char *value)
{
- IDOverrideStaticPropertyOperation *opop = ptr->data;
+ IDOverrideLibraryPropertyOperation *opop = ptr->data;
strcpy(value, (opop->subitem_reference_name == NULL) ? "" : opop->subitem_reference_name);
}
-int rna_ID_override_static_property_operation_refname_length(PointerRNA *ptr)
+int rna_ID_override_library_property_operation_refname_length(PointerRNA *ptr)
{
- IDOverrideStaticPropertyOperation *opop = ptr->data;
+ IDOverrideLibraryPropertyOperation *opop = ptr->data;
return (opop->subitem_reference_name == NULL) ? 0 : strlen(opop->subitem_reference_name);
}
-void rna_ID_override_static_property_operation_locname_get(PointerRNA *ptr, char *value)
+void rna_ID_override_library_property_operation_locname_get(PointerRNA *ptr, char *value)
{
- IDOverrideStaticPropertyOperation *opop = ptr->data;
+ IDOverrideLibraryPropertyOperation *opop = ptr->data;
strcpy(value, (opop->subitem_local_name == NULL) ? "" : opop->subitem_local_name);
}
-int rna_ID_override_static_property_operation_locname_length(PointerRNA *ptr)
+int rna_ID_override_library_property_operation_locname_length(PointerRNA *ptr)
{
- IDOverrideStaticPropertyOperation *opop = ptr->data;
+ IDOverrideLibraryPropertyOperation *opop = ptr->data;
return (opop->subitem_local_name == NULL) ? 0 : strlen(opop->subitem_local_name);
}
@@ -493,11 +493,11 @@ static ID *rna_ID_copy(ID *id, Main *bmain)
static ID *rna_ID_override_create(ID *id, Main *bmain)
{
- if (!BKE_override_static_is_enabled() || id->lib == NULL) {
+ if (!BKE_override_library_is_enabled() || id->lib == NULL) {
return NULL;
}
- return BKE_override_static_create_from_id(bmain, id);
+ return BKE_override_library_create_from_id(bmain, id);
}
static void rna_ID_update_tag(ID *id, Main *bmain, ReportList *reports, int flag)
@@ -1220,44 +1220,44 @@ static void rna_def_image_preview(BlenderRNA *brna)
RNA_def_function_ui_description(func, "Reload the preview from its source path");
}
-static void rna_def_ID_override_static_property_operation(BlenderRNA *brna)
+static void rna_def_ID_override_library_property_operation(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem static_override_property_operation_items[] = {
- {IDOVERRIDESTATIC_OP_NOOP,
+ static const EnumPropertyItem override_library_property_operation_items[] = {
+ {IDOVERRIDE_LIBRARY_OP_NOOP,
"NOOP",
0,
"No-Op",
"Does nothing, prevents adding actual overrides (NOT USED)"},
- {IDOVERRIDESTATIC_OP_REPLACE,
+ {IDOVERRIDE_LIBRARY_OP_REPLACE,
"REPLACE",
0,
"Replace",
"Replace value of reference by overriding one"},
- {IDOVERRIDESTATIC_OP_ADD,
+ {IDOVERRIDE_LIBRARY_OP_ADD,
"DIFF_ADD",
0,
"Differential",
"Stores and apply difference between reference and local value (NOT USED)"},
- {IDOVERRIDESTATIC_OP_SUBTRACT,
+ {IDOVERRIDE_LIBRARY_OP_SUBTRACT,
"DIFF_SUB",
0,
"Differential",
"Stores and apply difference between reference and local value (NOT USED)"},
- {IDOVERRIDESTATIC_OP_MULTIPLY,
+ {IDOVERRIDE_LIBRARY_OP_MULTIPLY,
"FACT_MULTIPLY",
0,
"Factor",
"Stores and apply multiplication factor between reference and local value (NOT USED)"},
- {IDOVERRIDESTATIC_OP_INSERT_AFTER,
+ {IDOVERRIDE_LIBRARY_OP_INSERT_AFTER,
"INSERT_AFTER",
0,
"Insert After",
"Insert a new item into collection after the one referenced in subitem_reference_name or "
"_index"},
- {IDOVERRIDESTATIC_OP_INSERT_BEFORE,
+ {IDOVERRIDE_LIBRARY_OP_INSERT_BEFORE,
"INSERT_BEFORE",
0,
"Insert Before",
@@ -1266,13 +1266,13 @@ static void rna_def_ID_override_static_property_operation(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
- static const EnumPropertyItem static_override_property_flag_items[] = {
- {IDOVERRIDESTATIC_FLAG_MANDATORY,
+ static const EnumPropertyItem override_library_property_flag_items[] = {
+ {IDOVERRIDE_LIBRARY_FLAG_MANDATORY,
"MANDATORY",
0,
"Mandatory",
"For templates, prevents the user from removing pre-defined operation (NOT USED)"},
- {IDOVERRIDESTATIC_FLAG_LOCKED,
+ {IDOVERRIDE_LIBRARY_FLAG_LOCKED,
"LOCKED",
0,
"Locked",
@@ -1280,21 +1280,21 @@ static void rna_def_ID_override_static_property_operation(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
- srna = RNA_def_struct(brna, "IDOverrideStaticPropertyOperation", NULL);
+ srna = RNA_def_struct(brna, "IDOverrideLibraryPropertyOperation", NULL);
RNA_def_struct_ui_text(srna,
- "ID Static Override Property Operation",
+ "ID Library Override Property Operation",
"Description of an override operation over an overridden property");
prop = RNA_def_enum(srna,
"operation",
- static_override_property_operation_items,
- IDOVERRIDESTATIC_OP_REPLACE,
+ override_library_property_operation_items,
+ IDOVERRIDE_LIBRARY_OP_REPLACE,
"Operation",
"What override operation is performed");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* For now. */
prop = RNA_def_enum(
- srna, "flag", static_override_property_flag_items, 0, "Flags", "Optional flags (NOT USED)");
+ srna, "flag", override_library_property_flag_items, 0, "Flags", "Optional flags (NOT USED)");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* For now. */
prop = RNA_def_string(srna,
@@ -1305,8 +1305,8 @@ static void rna_def_ID_override_static_property_operation(BlenderRNA *brna)
"Used to handle insertions into collection");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* For now. */
RNA_def_property_string_funcs(prop,
- "rna_ID_override_static_property_operation_refname_get",
- "rna_ID_override_static_property_operation_refname_length",
+ "rna_ID_override_library_property_operation_refname_get",
+ "rna_ID_override_library_property_operation_refname_length",
NULL);
prop = RNA_def_string(srna,
@@ -1317,8 +1317,8 @@ static void rna_def_ID_override_static_property_operation(BlenderRNA *brna)
"Used to handle insertions into collection");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* For now. */
RNA_def_property_string_funcs(prop,
- "rna_ID_override_static_property_operation_locname_get",
- "rna_ID_override_static_property_operation_locname_length",
+ "rna_ID_override_library_property_operation_locname_get",
+ "rna_ID_override_library_property_operation_locname_length",
NULL);
prop = RNA_def_int(srna,
@@ -1344,14 +1344,14 @@ static void rna_def_ID_override_static_property_operation(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* For now. */
}
-static void rna_def_ID_override_static_property(BlenderRNA *brna)
+static void rna_def_ID_override_library_property(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "IDOverrideStaticProperty", NULL);
+ srna = RNA_def_struct(brna, "IDOverrideLibraryProperty", NULL);
RNA_def_struct_ui_text(
- srna, "ID Static Override Property", "Description of an overridden property");
+ srna, "ID Library Override Property", "Description of an overridden property");
/* String pointer, we *should* add get/set/etc.
* But NULL rna_path would be a nasty bug anyway. */
@@ -1365,21 +1365,21 @@ static void rna_def_ID_override_static_property(BlenderRNA *brna)
RNA_def_collection(srna,
"operations",
- "IDOverrideStaticPropertyOperation",
+ "IDOverrideLibraryPropertyOperation",
"Operations",
"List of overriding operations for a property");
- rna_def_ID_override_static_property_operation(brna);
+ rna_def_ID_override_library_property_operation(brna);
}
-static void rna_def_ID_override_static(BlenderRNA *brna)
+static void rna_def_ID_override_library(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna = RNA_def_struct(brna, "IDOverrideStatic", NULL);
+ srna = RNA_def_struct(brna, "IDOverrideLibrary", NULL);
RNA_def_struct_ui_text(
- srna, "ID Static Override", "Struct gathering all data needed by statically overridden IDs");
+ srna, "ID Library Override", "Struct gathering all data needed by overridden linked IDs");
RNA_def_pointer(
srna, "reference", "ID", "Reference ID", "Linked ID used as reference by this override");
@@ -1390,15 +1390,15 @@ static void rna_def_ID_override_static(BlenderRNA *brna)
true,
"Auto Generate Override",
"Automatically generate overriding operations by detecting changes in properties");
- RNA_def_property_boolean_sdna(prop, NULL, "flag", STATICOVERRIDE_AUTO);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", OVERRIDE_LIBRARY_AUTO);
RNA_def_collection(srna,
"properties",
- "IDOverrideStaticProperty",
+ "IDOverrideLibraryProperty",
"Properties",
"List of overridden properties");
- rna_def_ID_override_static_property(brna);
+ rna_def_ID_override_library_property(brna);
}
static void rna_def_ID(BlenderRNA *brna)
@@ -1486,7 +1486,7 @@ static void rna_def_ID(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Library", "Library file the data-block is linked from");
prop = RNA_def_pointer(
- srna, "override_static", "IDOverrideStatic", "Static Override", "Static override data");
+ srna, "override_library", "IDOverrideLibrary", "Library Override", "Library override data");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_pointer(
@@ -1659,7 +1659,7 @@ void RNA_def_ID(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Any Type", "RNA type used for pointers to any possible data");
rna_def_ID(brna);
- rna_def_ID_override_static(brna);
+ rna_def_ID_override_library(brna);
rna_def_image_preview(brna);
rna_def_ID_properties(brna);
rna_def_ID_materials(brna);