Blender V5.3
IO_subdiv_disabler.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "DNA_modifier_types.h"
12
13#include "BLI_vector.hh"
14
15namespace blender {
16
17struct Depsgraph;
18struct ModifierData;
19struct Object;
20struct Scene;
21
22namespace io {
23
36 private:
37 Depsgraph *depsgraph_;
38
39 /* TODO: Track the object and its disabled modifier in a single struct and use just 1 Vector. */
40 Vector<ModifierData *> disabled_modifiers_;
41 Vector<Object *> modified_objects_;
42
43 public:
44 explicit SubdivModifierDisabler(Depsgraph *depsgraph);
46
50 void disable_modifiers();
51
57 static ModifierData *get_subdiv_modifier(Scene *scene, const Object *ob, ModifierMode mode);
58
59 /* Disallow copying. */
62
63 private:
68 void disable_modifier(ModifierData *mod);
69};
70
71} // namespace io
72} // namespace blender
#define final(a, b, c)
Definition BLI_hash_c.hh:21
SubdivModifierDisabler(Depsgraph *depsgraph)
SubdivModifierDisabler(const SubdivModifierDisabler &)=delete
SubdivModifierDisabler & operator=(const SubdivModifierDisabler &)=delete
static ModifierData * get_subdiv_modifier(Scene *scene, const Object *ob, ModifierMode mode)
VecBase< float, D > constexpr mod(VecOp< float, D >, VecOp< float, D >) RET
BMesh Iterators.