[Bf-blender-cvs] [c85397ad51c] refactor-idprop-ui-data: Rename IDP_free_ui_data -> IDP_ui_data_free
Hans Goudey
noreply at git.blender.org
Thu Aug 5 21:01:51 CEST 2021
Commit: c85397ad51cae622be09fc88082fd24fad0bdd22
Author: Hans Goudey
Date: Thu Aug 5 13:19:36 2021 -0500
Branches: refactor-idprop-ui-data
https://developer.blender.org/rBc85397ad51cae622be09fc88082fd24fad0bdd22
Rename IDP_free_ui_data -> IDP_ui_data_free
===================================================================
M source/blender/blenkernel/BKE_idprop.h
M source/blender/blenkernel/intern/idprop.c
M source/blender/modifiers/intern/MOD_nodes.cc
M source/blender/python/generic/idprop_py_ui_api.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 925b289e56f..63da6e429a5 100644
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@ -229,7 +229,7 @@ typedef enum eIDPropertyUIDataType {
bool IDP_ui_data_supported(const struct IDProperty *prop);
eIDPropertyUIDataType IDP_ui_data_type(const struct IDProperty *prop);
-void IDP_free_ui_data(struct IDProperty *prop);
+void IDP_ui_data_free(struct IDProperty *prop);
struct IDPropertyUIData *IDP_ui_data_ensure(struct IDProperty *prop);
struct IDPropertyUIData *IDP_ui_data_copy(const struct IDProperty *prop);
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index b52ce1198e6..e5a48127d01 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -1096,7 +1096,7 @@ IDProperty *IDP_New(const char type, const IDPropertyTemplate *val, const char *
return prop;
}
-void IDP_free_ui_data(IDProperty *prop)
+void IDP_ui_data_free(IDProperty *prop)
{
switch (IDP_ui_data_type(prop)) {
case IDP_UI_DATA_TYPE_STRING: {
@@ -1154,7 +1154,7 @@ void IDP_FreePropertyContent_ex(IDProperty *prop, const bool do_id_user)
}
if (prop->ui_data != NULL) {
- IDP_free_ui_data(prop);
+ IDP_ui_data_free(prop);
}
}
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 463bf07bb06..c13a0e9c940 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -506,7 +506,7 @@ void MOD_nodes_update_interface(Object *object, NodesModifierData *nmd)
new_prop->ui_data = nullptr;
IDP_CopyPropertyContent(new_prop, old_prop);
if (new_prop->ui_data != nullptr) {
- IDP_free_ui_data(new_prop);
+ IDP_ui_data_free(new_prop);
}
new_prop->ui_data = ui_data;
}
diff --git a/source/blender/python/generic/idprop_py_ui_api.c b/source/blender/python/generic/idprop_py_ui_api.c
index 2b63a9bf6ad..ab34844c776 100644
--- a/source/blender/python/generic/idprop_py_ui_api.c
+++ b/source/blender/python/generic/idprop_py_ui_api.c
@@ -257,12 +257,13 @@ static bool idprop_ui_data_update_float(IDProperty *idprop, PyObject *args, PyOb
return false;
}
+ IDPropertyUIDataFloat *ui_data = (IDPropertyUIDataFloat *)idprop->ui_data;
+ IDPropertyUIDataFloat ui_data_local;
+
if (!idprop_ui_data_update_base(idprop, rna_subtype, description)) {
return false;
}
- IDPropertyUIDataFloat *ui_data = (IDPropertyUIDataFloat *)idprop->ui_data;
-
if (args_contain_key(kwargs, "min")) {
ui_data->min = min;
ui_data->soft_min = MAX2(ui_data->soft_min, ui_data->min);
@@ -565,7 +566,7 @@ static PyObject *BPy_IDPropertyUIManager_clear(BPy_IDPropertyUIManager *self)
}
if (property->ui_data != NULL) {
- IDP_free_ui_data(property);
+ IDP_ui_data_free(property);
}
Py_RETURN_NONE;
@@ -596,7 +597,7 @@ static PyObject *BPy_IDPropertyUIManager_update_from(BPy_IDPropertyUIManager *se
}
if (property->ui_data != NULL) {
- IDP_free_ui_data(property);
+ IDP_ui_data_free(property);
}
property->ui_data = IDP_ui_data_copy(ui_manager_src->property);
More information about the Bf-blender-cvs
mailing list