Blender  V2.93
tree_display.h
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 "DNA_space_types.h"
26 
27 struct ListBase;
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
34 typedef struct TreeDisplay TreeDisplay;
35 
39 typedef struct TreeSourceData {
40  struct Main *bmain;
41  struct Scene *scene;
44 
46 void outliner_tree_display_destroy(TreeDisplay **tree_display);
47 
49 
50 /* The following functions are needed to build the tree. They are calls back into C; the way
51  * elements are created should be refactored and ported to C++ with a new design/API too. */
52 struct TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
53  ListBase *lb,
54  void *idv,
55  struct TreeElement *parent,
56  short type,
57  short index);
59 bool outliner_animdata_test(const struct AnimData *adt);
61  struct Collection *collection,
62  TreeElement *ten);
63 
64 const char *outliner_idcode_to_plural(short idcode);
65 
66 #ifdef __cplusplus
67 }
68 #endif
eSpaceOutliner_Mode
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Definition: BKE_main.h:116
struct TreeElement * parent
The data to build the tree from.
Definition: tree_display.h:39
struct Scene * scene
Definition: tree_display.h:41
struct ViewLayer * view_layer
Definition: tree_display.h:42
struct Main * bmain
Definition: tree_display.h:40
bool outliner_animdata_test(const struct AnimData *adt)
void outliner_tree_display_destroy(TreeDisplay **tree_display)
Definition: tree_display.cc:59
struct TreeDisplay TreeDisplay
Definition: tree_display.h:34
ListBase outliner_tree_display_build_tree(TreeDisplay *tree_display, TreeSourceData *source_data)
Definition: tree_display.cc:65
struct TreeElement * outliner_add_element(SpaceOutliner *space_outliner, ListBase *lb, void *idv, struct TreeElement *parent, short type, short index)
void outliner_make_object_parent_hierarchy(ListBase *lb)
TreeElement * outliner_add_collection_recursive(SpaceOutliner *space_outliner, struct Collection *collection, TreeElement *ten)
const char * outliner_idcode_to_plural(short idcode)
Definition: common.cc:33
struct TreeSourceData TreeSourceData
The data to build the tree from.
TreeDisplay * outliner_tree_display_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner)
Definition: tree_display.cc:27