Blender V5.3
sculpt_undo.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <cstdint>
12
13#include "BLI_index_mask_fwd.hh"
14#include "BLI_span.hh"
15#include "BLI_vector.hh"
16
17namespace blender {
18
19struct Depsgraph;
20struct Mesh;
21struct Object;
22struct Scene;
23struct wmOperator;
24namespace bke::pbvh {
25class Node;
26}
27
28namespace ed::sculpt_paint::undo {
29
42
43struct StepData;
44
51void push_node(const Depsgraph &depsgraph,
52 const Object &object,
53 const bke::pbvh::Node *node,
54 undo::Type type);
55void push_nodes(const Depsgraph &depsgraph,
56 Object &object,
57 const IndexMask &node_mask,
58 undo::Type type);
59
65void push_begin(const Scene &scene, Object &ob, const wmOperator *op);
66
72void push_enter_sculpt_mode(const Scene &scene, Object &ob, const wmOperator *op);
73
78void push_begin_ex(const Scene &scene, Object &ob, const char *name);
79void push_end(Object &ob);
80void push_end_ex(Object &ob, bool use_nested_undo);
81
82void restore_from_bmesh_enter_geometry(const StepData &step_data, Mesh &mesh);
84
85void restore_position_from_undo_step(const Depsgraph &depsgraph, Object &object);
86
87namespace compression {
88
93template<typename T>
94void filter_compress(const Span<T> src,
95 Vector<std::byte> &filter_buffer,
96 Vector<std::byte> &compress_buffer);
97
99template<typename T>
100void filter_decompress(const Span<std::byte> src, Vector<std::byte> &buffer, Vector<T> &dst);
101
102} // namespace compression
103
104} // namespace ed::sculpt_paint::undo
105
106} // namespace blender
void filter_decompress(const Span< std::byte > src, Vector< std::byte > &buffer, Vector< T > &dst)
void filter_compress(const Span< T > src, Vector< std::byte > &filter_buffer, Vector< std::byte > &compress_buffer)
void push_nodes(const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const Type type)
void push_begin_ex(const Scene &, Object &ob, const char *name)
void push_enter_sculpt_mode(const Scene &, Object &ob, const wmOperator *op)
void restore_position_from_undo_step(const Depsgraph &depsgraph, Object &object)
Definition sculpt.cc:1181
void push_node(const Depsgraph &depsgraph, const Object &object, const bke::pbvh::Node *node, const Type type)
void push_begin(const Scene &scene, Object &ob, const wmOperator *op)
void restore_from_bmesh_enter_geometry(const StepData &step_data, Mesh &mesh)
void push_end_ex(Object &ob, const bool use_nested_undo)
BMesh Iterators.
signed char int8_t
Definition BKE_text.h:76