diff options
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_library_load.c | 9 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 1 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_gizmo.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_gizmo.h | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_utils_units.c | 9 |
6 files changed, 17 insertions, 12 deletions
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index bdad4d03ae7..a3750d348f5 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -327,7 +327,10 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true); /* here appending/linking starts */ - mainl = BLO_library_link_begin(bmain, &(self->blo_handle), self->relpath); + struct LibraryLink_Params liblink_params; + BLO_library_link_params_init(&liblink_params, bmain, self->flag); + + mainl = BLO_library_link_begin(&(self->blo_handle), self->relpath, &liblink_params); { int idcode_step = 0, idcode; @@ -350,7 +353,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) if (item_idname) { ID *id = BLO_library_link_named_part( - mainl, &(self->blo_handle), idcode, item_idname); + mainl, &(self->blo_handle), idcode, item_idname, &liblink_params); if (id) { #ifdef USE_RNA_DATABLOCKS /* swap name for pointer to the id */ @@ -394,7 +397,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) } Library *lib = mainl->curlib; /* newly added lib, assign before append end */ - BLO_library_link_end(mainl, &(self->blo_handle), self->flag, NULL, NULL, NULL, NULL); + BLO_library_link_end(mainl, &(self->blo_handle), &liblink_params); BLO_blendhandle_close(self->blo_handle); self->blo_handle = NULL; diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index a78ed601d57..bc708bd4a89 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -172,6 +172,7 @@ static const EnumPropertyItem property_subtype_array_items[] = { {PROP_LAYER, "LAYER", 0, "Layer", ""}, {PROP_LAYER_MEMBER, "LAYER_MEMBER", 0, "Layer Member", ""}, {PROP_POWER, "POWER", 0, "Power", ""}, + {PROP_TEMPERATURE, "TEMPERATURE", 0, "Temperature", ""}, {PROP_NONE, "NONE", 0, "None", ""}, {0, NULL, 0, NULL, NULL}, diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index cc981c7c2e1..0980d9df762 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -219,10 +219,10 @@ static void value_id_set(void *id) } static void id_release_weakref_list(struct ID *id, GHash *weakinfo_hash); -static PyObject *id_free_weakref_cb(PyObject *weakinfo_capsule, PyObject *weakref) +static PyObject *id_free_weakref_cb(PyObject *weakinfo_pair, PyObject *weakref) { /* Important to search backwards. */ - GHash *weakinfo_hash = PyCapsule_GetPointer(weakinfo_capsule, NULL); + GHash *weakinfo_hash = PyCapsule_GetPointer(weakinfo_pair, NULL); if (BLI_ghash_len(weakinfo_hash) > 1) { BLI_ghash_remove(weakinfo_hash, weakref, NULL, NULL); diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c index 575824e8a86..542d014f8b2 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.c +++ b/source/blender/python/intern/bpy_rna_gizmo.c @@ -507,7 +507,7 @@ fail: /** \} */ -int BPY_rna_gizmo_module(PyObject *mod_par) +bool BPY_rna_gizmo_module(PyObject *mod_par) { static PyMethodDef method_def_array[] = { /* Gizmo Target Property Define API */ @@ -541,5 +541,5 @@ int BPY_rna_gizmo_module(PyObject *mod_par) PyModule_AddObject(mod_par, name_prefix, func_inst); } - return 0; + return false; } diff --git a/source/blender/python/intern/bpy_rna_gizmo.h b/source/blender/python/intern/bpy_rna_gizmo.h index 307b694338c..e4ac43bfe6c 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.h +++ b/source/blender/python/intern/bpy_rna_gizmo.h @@ -24,7 +24,7 @@ extern "C" { #endif -int BPY_rna_gizmo_module(PyObject *); +bool BPY_rna_gizmo_module(PyObject *); #ifdef __cplusplus } diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c index 4433f5d0f88..a58e2bcb975 100644 --- a/source/blender/python/intern/bpy_utils_units.c +++ b/source/blender/python/intern/bpy_utils_units.c @@ -134,7 +134,7 @@ static bool bpyunits_validate(const char *usys_str, const char *ucat_str, int *r return false; } - if (!bUnit_IsValid(*r_usys, *r_ucat)) { + if (!BKE_unit_is_valid(*r_usys, *r_ucat)) { PyErr_Format(PyExc_ValueError, "%.200s / %.200s unit system/category combination is not valid.", usys_str, @@ -197,7 +197,7 @@ static PyObject *bpyunits_to_value(PyObject *UNUSED(self), PyObject *args, PyObj str = PyMem_MALLOC(sizeof(*str) * (size_t)str_len); BLI_strncpy(str, inpt, (size_t)str_len); - bUnit_ReplaceString(str, (int)str_len, uref, scale, usys, ucat); + BKE_unit_replace_string(str, (int)str_len, uref, scale, usys, ucat); if (!PyC_RunString_AsNumber(NULL, str, "<bpy_units_api>", &result)) { if (PyErr_Occurred()) { @@ -291,10 +291,11 @@ static PyObject *bpyunits_to_string(PyObject *UNUSED(self), PyObject *args, PyOb char buf1[64], buf2[64], *str; PyObject *result; - bUnit_AsString(buf1, sizeof(buf1), value, precision, usys, ucat, (bool)split_unit, false); + BKE_unit_value_as_string_adaptive( + buf1, sizeof(buf1), value, precision, usys, ucat, (bool)split_unit, false); if (compatible_unit) { - bUnit_ToUnitAltName(buf2, sizeof(buf2), buf1, usys, ucat); + BKE_unit_name_to_alt(buf2, sizeof(buf2), buf1, usys, ucat); str = buf2; } else { |