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/editors')
-rw-r--r--source/blender/editors/interface/interface_drag.cc4
-rw-r--r--source/blender/editors/interface/interface_ops.cc50
-rw-r--r--source/blender/editors/mesh/editface.cc4
-rw-r--r--source/blender/editors/object/object_add.cc2
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.cc4
-rw-r--r--source/blender/editors/space_outliner/tree/tree_element_overrides.cc2
6 files changed, 33 insertions, 33 deletions
diff --git a/source/blender/editors/interface/interface_drag.cc b/source/blender/editors/interface/interface_drag.cc
index 1db3db32411..0c7c3a238ec 100644
--- a/source/blender/editors/interface/interface_drag.cc
+++ b/source/blender/editors/interface/interface_drag.cc
@@ -130,7 +130,7 @@ void ui_but_drag_start(bContext *C, uiBut *but)
(but->dragflag & UI_BUT_DRAGPOIN_FREE) ? WM_DRAG_FREE_DATA :
WM_DRAG_NOP);
/* wmDrag has ownership over dragpoin now, stop messing with it. */
- but->dragpoin = NULL;
+ but->dragpoin = nullptr;
if (but->imb) {
WM_event_drag_image(drag, but->imb, but->imb_scale);
@@ -141,6 +141,6 @@ void ui_but_drag_start(bContext *C, uiBut *but)
/* Special feature for assets: We add another drag item that supports multiple assets. It
* gets the assets from context. */
if (ELEM(but->dragtype, WM_DRAG_ASSET, WM_DRAG_ID)) {
- WM_event_start_drag(C, ICON_NONE, WM_DRAG_ASSET_LIST, NULL, 0, WM_DRAG_NOP);
+ WM_event_start_drag(C, ICON_NONE, WM_DRAG_ASSET_LIST, nullptr, 0, WM_DRAG_NOP);
}
}
diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc
index c8e6fb5a6e2..940ef0c4923 100644
--- a/source/blender/editors/interface/interface_ops.cc
+++ b/source/blender/editors/interface/interface_ops.cc
@@ -756,13 +756,13 @@ static void override_idtemplate_ids_get(
PropertyRNA *prop;
UI_context_active_but_prop_get_templateID(C, &owner_ptr, &prop);
- if (owner_ptr.data == NULL || prop == NULL) {
- *r_owner_id = *r_id = NULL;
- if (r_owner_ptr != NULL) {
+ if (owner_ptr.data == nullptr || prop == nullptr) {
+ *r_owner_id = *r_id = nullptr;
+ if (r_owner_ptr != nullptr) {
*r_owner_ptr = PointerRNA_NULL;
}
- if (r_prop != NULL) {
- *r_prop = NULL;
+ if (r_prop != nullptr) {
+ *r_prop = nullptr;
}
return;
}
@@ -770,10 +770,10 @@ static void override_idtemplate_ids_get(
*r_owner_id = owner_ptr.owner_id;
PointerRNA idptr = RNA_property_pointer_get(&owner_ptr, prop);
*r_id = static_cast<ID *>(idptr.data);
- if (r_owner_ptr != NULL) {
+ if (r_owner_ptr != nullptr) {
*r_owner_ptr = owner_ptr;
}
- if (r_prop != NULL) {
+ if (r_prop != nullptr) {
*r_prop = prop;
}
}
@@ -781,9 +781,9 @@ static void override_idtemplate_ids_get(
static bool override_idtemplate_poll(bContext *C, const bool is_create_op)
{
ID *owner_id, *id;
- override_idtemplate_ids_get(C, &owner_id, &id, NULL, NULL);
+ override_idtemplate_ids_get(C, &owner_id, &id, nullptr, nullptr);
- if (owner_id == NULL || id == NULL) {
+ if (owner_id == nullptr || id == nullptr) {
return false;
}
@@ -812,14 +812,14 @@ static int override_idtemplate_make_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA owner_ptr;
PropertyRNA *prop;
override_idtemplate_ids_get(C, &owner_id, &id, &owner_ptr, &prop);
- if (ELEM(NULL, owner_id, id)) {
+ if (ELEM(nullptr, owner_id, id)) {
return OPERATOR_CANCELLED;
}
ID *id_override = ui_template_id_liboverride_hierarchy_make(
- C, CTX_data_main(C), owner_id, id, NULL);
+ C, CTX_data_main(C), owner_id, id, nullptr);
- if (id_override == NULL) {
+ if (id_override == nullptr) {
return OPERATOR_CANCELLED;
}
@@ -833,16 +833,16 @@ static int override_idtemplate_make_exec(bContext *C, wmOperator *UNUSED(op))
* override of the data too. */
if (!ID_IS_LINKED(owner_id)) {
RNA_id_pointer_create(id_override, &idptr);
- RNA_property_pointer_set(&owner_ptr, prop, idptr, NULL);
+ RNA_property_pointer_set(&owner_ptr, prop, idptr, nullptr);
}
RNA_property_update(C, &owner_ptr, prop);
/* 'Security' extra tagging, since this process may also affect the owner ID and not only the
* used ID, relying on the property update code only is not always enough. */
DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_BASE_FLAGS | ID_RECALC_COPY_ON_WRITE);
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- WM_event_add_notifier(C, NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL);
- WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ WM_event_add_notifier(C, NC_WINDOW, nullptr);
+ WM_event_add_notifier(C, NC_WM | ND_LIB_OVERRIDE_CHANGED, nullptr);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, nullptr);
return OPERATOR_FINISHED;
}
@@ -875,7 +875,7 @@ static int override_idtemplate_reset_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA owner_ptr;
PropertyRNA *prop;
override_idtemplate_ids_get(C, &owner_id, &id, &owner_ptr, &prop);
- if (ELEM(NULL, owner_id, id)) {
+ if (ELEM(nullptr, owner_id, id)) {
return OPERATOR_CANCELLED;
}
@@ -888,7 +888,7 @@ static int override_idtemplate_reset_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA idptr;
/* `idptr` is re-assigned to owner property to ensure proper updates etc. */
RNA_id_pointer_create(id, &idptr);
- RNA_property_pointer_set(&owner_ptr, prop, idptr, NULL);
+ RNA_property_pointer_set(&owner_ptr, prop, idptr, nullptr);
RNA_property_update(C, &owner_ptr, prop);
/* No need for 'security' extra tagging here, since this process will never affect the owner ID.
@@ -923,7 +923,7 @@ static int override_idtemplate_clear_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA owner_ptr;
PropertyRNA *prop;
override_idtemplate_ids_get(C, &owner_id, &id, &owner_ptr, &prop);
- if (ELEM(NULL, owner_id, id)) {
+ if (ELEM(nullptr, owner_id, id)) {
return OPERATOR_CANCELLED;
}
@@ -948,7 +948,7 @@ static int override_idtemplate_clear_exec(bContext *C, wmOperator *UNUSED(op))
if (do_remap_active) {
Object *ref_object = (Object *)id_new;
Base *basact = BKE_view_layer_base_find(view_layer, ref_object);
- if (basact != NULL) {
+ if (basact != nullptr) {
view_layer->basact = basact;
}
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
@@ -967,9 +967,9 @@ static int override_idtemplate_clear_exec(bContext *C, wmOperator *UNUSED(op))
/* 'Security' extra tagging, since this process may also affect the owner ID and not only the
* used ID, relying on the property update code only is not always enough. */
DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS | ID_RECALC_COPY_ON_WRITE);
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- WM_event_add_notifier(C, NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL);
- WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ WM_event_add_notifier(C, NC_WINDOW, nullptr);
+ WM_event_add_notifier(C, NC_WM | ND_LIB_OVERRIDE_CHANGED, nullptr);
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, nullptr);
return OPERATOR_FINISHED;
}
@@ -995,9 +995,9 @@ static bool override_idtemplate_menu_poll(const bContext *C_const, MenuType *UNU
{
bContext *C = (bContext *)C_const;
ID *owner_id, *id;
- override_idtemplate_ids_get(C, &owner_id, &id, NULL, NULL);
+ override_idtemplate_ids_get(C, &owner_id, &id, nullptr, nullptr);
- if (owner_id == NULL || id == NULL) {
+ if (owner_id == nullptr || id == nullptr) {
return false;
}
diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc
index c55d96bac55..054c01626f8 100644
--- a/source/blender/editors/mesh/editface.cc
+++ b/source/blender/editors/mesh/editface.cc
@@ -624,7 +624,7 @@ void paintvert_hide(bContext *C, Object *ob, const bool unselected)
{
using namespace blender;
Mesh *me = BKE_mesh_from_object(ob);
- if (me == NULL || me->totvert == 0) {
+ if (me == nullptr || me->totvert == 0) {
return;
}
@@ -657,7 +657,7 @@ void paintvert_reveal(bContext *C, Object *ob, const bool select)
{
using namespace blender;
Mesh *me = BKE_mesh_from_object(ob);
- if (me == NULL || me->totvert == 0) {
+ if (me == nullptr || me->totvert == 0) {
return;
}
diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc
index 7aa340408e1..68fd90adfb3 100644
--- a/source/blender/editors/object/object_add.cc
+++ b/source/blender/editors/object/object_add.cc
@@ -3664,7 +3664,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
Object *ob_new_active = nullptr;
CTX_DATA_BEGIN (C, Base *, base, selected_bases) {
- Object *ob_new = NULL;
+ Object *ob_new = nullptr;
object_add_duplicate_internal(bmain,
scene,
view_layer,
diff --git a/source/blender/editors/space_outliner/outliner_collections.cc b/source/blender/editors/space_outliner/outliner_collections.cc
index 836ad3e3f93..440b77adefc 100644
--- a/source/blender/editors/space_outliner/outliner_collections.cc
+++ b/source/blender/editors/space_outliner/outliner_collections.cc
@@ -376,7 +376,7 @@ void outliner_collection_delete(
const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(&parent->id);
BLI_assert(id_type->owner_get != nullptr);
- ID *scene_owner = id_type->owner_get(bmain, &parent->id, NULL);
+ ID *scene_owner = id_type->owner_get(bmain, &parent->id, nullptr);
BLI_assert(GS(scene_owner->name) == ID_SCE);
if (ID_IS_LINKED(scene_owner) || ID_IS_OVERRIDE_LIBRARY(scene_owner)) {
skip = true;
@@ -609,7 +609,7 @@ static int collection_duplicate_exec(bContext *C, wmOperator *op)
const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(&parent->id);
BLI_assert(id_type->owner_get != nullptr);
- Scene *scene_owner = (Scene *)id_type->owner_get(bmain, &parent->id, NULL);
+ Scene *scene_owner = (Scene *)id_type->owner_get(bmain, &parent->id, nullptr);
BLI_assert(scene_owner != nullptr);
BLI_assert(GS(scene_owner->id.name) == ID_SCE);
diff --git a/source/blender/editors/space_outliner/tree/tree_element_overrides.cc b/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
index 49cabd5117f..11067d37966 100644
--- a/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
+++ b/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
@@ -292,7 +292,7 @@ void OverrideRNAPathTreeBuilder::build_path(TreeElement &parent,
PointerRNA idpoin;
RNA_id_pointer_create(&override_data.id, &idpoin);
- ListBase path_elems = {NULL};
+ ListBase path_elems = {nullptr};
if (!RNA_path_resolve_elements(&idpoin, override_data.override_property.rna_path, &path_elems)) {
return;
}