Blender  V2.93
tree_element_id.hh
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
23 #pragma once
24 
25 #include "tree_element.hh"
26 
27 namespace blender::ed::outliner {
28 
30  protected:
31  ID &id_;
32 
33  public:
34  TreeElementID(TreeElement &legacy_te, ID &id);
35 
36  static TreeElementID *createFromID(TreeElement &legacy_te, ID &id);
37 
38  void postExpand(SpaceOutliner &) const override;
39  bool expandPoll(const SpaceOutliner &) const override;
40 
45  bool isExpandValid() const override
46  {
47  return false;
48  }
49 
50  protected:
51  /* ID types with animation data can use this. */
52  void expand_animation_data(SpaceOutliner &, const AnimData *) const;
53 };
54 
55 } // namespace blender::ed::outliner
TreeElementID(TreeElement &legacy_te, ID &id)
bool expandPoll(const SpaceOutliner &) const override
void postExpand(SpaceOutliner &) const override
void expand_animation_data(SpaceOutliner &, const AnimData *) const
static TreeElementID * createFromID(TreeElement &legacy_te, ID &id)
Definition: DNA_ID.h:273