diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/crazyspace.cc | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editface.cc | 4 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 14 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_undo.cc | 10 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.cc | 3 |
6 files changed, 19 insertions, 24 deletions
diff --git a/source/blender/blenkernel/intern/crazyspace.cc b/source/blender/blenkernel/intern/crazyspace.cc index 8d4b64da817..fdd269bd9c8 100644 --- a/source/blender/blenkernel/intern/crazyspace.cc +++ b/source/blender/blenkernel/intern/crazyspace.cc @@ -73,7 +73,7 @@ static void set_crazy_vertex_quat(float r_quat[4], static bool modifiers_disable_subsurf_temporary(struct Scene *scene, Object *ob) { bool disabled = false; - int cageIndex = BKE_modifiers_get_cage_index(scene, ob, nullptr, 1); + int cageIndex = BKE_modifiers_get_cage_index(scene, ob, nullptr, true); ModifierData *md = static_cast<ModifierData *>(ob->modifiers.first); for (int i = 0; md && i <= cageIndex; i++, md = md->next) { @@ -241,7 +241,7 @@ int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgra Mesh *me_input = static_cast<Mesh *>(ob->data); Mesh *me = nullptr; int i, a, modifiers_left_num = 0, verts_num = 0; - int cageIndex = BKE_modifiers_get_cage_index(scene, ob, nullptr, 1); + int cageIndex = BKE_modifiers_get_cage_index(scene, ob, nullptr, true); float(*defmats)[3][3] = nullptr, (*deformedVerts)[3] = nullptr; VirtualModifierData virtualModifierData; ModifierEvalContext mectx = {depsgraph, ob, ModifierApplyFlag(0)}; @@ -362,7 +362,7 @@ int BKE_sculpt_get_first_deform_matrices(struct Depsgraph *depsgraph, VirtualModifierData virtualModifierData; Object object_eval; crazyspace_init_object_for_eval(depsgraph, object, &object_eval); - MultiresModifierData *mmd = get_multires_modifier(scene, &object_eval, 0); + MultiresModifierData *mmd = get_multires_modifier(scene, &object_eval, false); const bool is_sculpt_mode = (object->mode & OB_MODE_SCULPT) != 0; const bool has_multires = mmd != nullptr && mmd->sculptlvl > 0; const ModifierEvalContext mectx = {depsgraph, &object_eval, ModifierApplyFlag(0)}; diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc index b69cd8b8606..3608e162727 100644 --- a/source/blender/editors/mesh/editface.cc +++ b/source/blender/editors/mesh/editface.cc @@ -556,7 +556,7 @@ void paintvert_hide(bContext *C, Object *ob, const bool unselected) { Mesh *const me = BKE_mesh_from_object(ob); - if (me == NULL || me->totvert == 0) { + if (me == nullptr || me->totvert == 0) { return; } @@ -584,7 +584,7 @@ void paintvert_reveal(bContext *C, Object *ob, const bool select) { Mesh *const 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/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 0d6b6ee1d78..83e6c837eac 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -1032,15 +1032,13 @@ static eContextResult screen_ctx_sel_actions_impl(const bContext *C, CTX_data_id_pointer_set(result, (ID *)action); break; } - else { - if (editable && ID_IS_LINKED(action)) { - continue; - } + if (editable && ID_IS_LINKED(action)) { + continue; + } - /* Add the action to the output list if not already added. */ - if (BLI_gset_add(seen_set, action)) { - CTX_data_id_list_add(result, &action->id); - } + /* Add the action to the output list if not already added. */ + if (BLI_gset_add(seen_set, action)) { + CTX_data_id_list_add(result, &action->id); } } } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 8f2ad1b63be..2366089cefb 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -757,9 +757,7 @@ static void sculpt_vertex_neighbor_add(SculptVertexNeighborIter *iter, iter->size++; } -static void sculpt_vertex_neighbors_get_bmesh(SculptSession *ss, - PBVHVertRef vertex, - SculptVertexNeighborIter *iter) +static void sculpt_vertex_neighbors_get_bmesh(PBVHVertRef vertex, SculptVertexNeighborIter *iter) { BMVert *v = (BMVert *)vertex.i; BMIter liter; @@ -875,7 +873,7 @@ void SCULPT_vertex_neighbors_get(SculptSession *ss, sculpt_vertex_neighbors_get_faces(ss, vertex, iter); return; case PBVH_BMESH: - sculpt_vertex_neighbors_get_bmesh(ss, vertex, iter); + sculpt_vertex_neighbors_get_bmesh(vertex, iter); return; case PBVH_GRIDS: sculpt_vertex_neighbors_get_grids(ss, vertex, include_duplicates, iter); diff --git a/source/blender/editors/space_image/image_undo.cc b/source/blender/editors/space_image/image_undo.cc index 0fe0414c177..9e8db58ccc2 100644 --- a/source/blender/editors/space_image/image_undo.cc +++ b/source/blender/editors/space_image/image_undo.cc @@ -432,7 +432,7 @@ static void utile_decref(UndoImageTile *utile) /** \name Image Undo Buffer * \{ */ -typedef struct UndoImageBuf { +struct UndoImageBuf { struct UndoImageBuf *next, *prev; /** @@ -456,8 +456,7 @@ typedef struct UndoImageBuf { bool use_float; char gen_type; } image_state; - -} UndoImageBuf; +}; static UndoImageBuf *ubuf_from_image_no_tiles(Image *image, const ImBuf *ibuf) { @@ -552,7 +551,7 @@ static void ubuf_free(UndoImageBuf *ubuf) /** \name Image Undo Handle * \{ */ -typedef struct UndoImageHandle { +struct UndoImageHandle { struct UndoImageHandle *next, *prev; /** Each undo handle refers to a single image which may have multiple buffers. */ @@ -567,8 +566,7 @@ typedef struct UndoImageHandle { * List of #UndoImageBuf's to support multiple buffers per image. */ ListBase buffers; - -} UndoImageHandle; +}; static void uhandle_restore_list(ListBase *undo_handles, bool use_init) { diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index 479214ee2d3..6808f06bdd3 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -498,7 +498,8 @@ static bool snap_object_is_snappable(const SnapObjectContext *sctx, const bool is_edited = (base->object->mode == OB_MODE_EDIT); const bool is_selectable = (base->flag & BASE_SELECTABLE); /* Get attributes of state. */ - const bool is_in_object_mode = (base_act == NULL) || (base_act->object->mode == OB_MODE_OBJECT); + const bool is_in_object_mode = (base_act == nullptr) || + (base_act->object->mode == OB_MODE_OBJECT); if (is_in_object_mode) { /* Handle target selection options that make sense for object mode. */ |