Blender V5.0
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#pragma once
5
7
8#include "BLI_vector.hh"
9
10struct Depsgraph;
11struct ModifierData;
12struct Object;
13struct Scene;
14
15namespace blender::io {
16
29 private:
30 Depsgraph *depsgraph_;
31
32 /* TODO: Track the object and its disabled modifier in a single struct and use just 1 Vector. */
33 blender::Vector<ModifierData *> disabled_modifiers_;
34 blender::Vector<Object *> modified_objects_;
35
36 public:
37 explicit SubdivModifierDisabler(Depsgraph *depsgraph);
39
43 void disable_modifiers();
44
50 static ModifierData *get_subdiv_modifier(Scene *scene, const Object *ob, ModifierMode mode);
51
52 /* Disallow copying. */
55
56 private:
61 void disable_modifier(ModifierData *mod);
62};
63
64} // namespace blender::io
#define final(a, b, c)
Definition BLI_hash.h:19
BPy_StructRNA * depsgraph
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