Blender  V3.3
BlenderContext.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 #include "BKE_context.h"
10 #include "BKE_main.h"
11 #include "BLI_linklist.h"
12 #include "BlenderTypes.h"
13 #include "DEG_depsgraph.h"
14 #include "DEG_depsgraph_query.h"
15 #include "DNA_layer_types.h"
16 #include "DNA_object_types.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
24 
25 bool bc_is_in_Export_set(LinkNode *export_set, Object *ob, ViewLayer *view_layer);
26 bool bc_is_base_node(LinkNode *export_set, Object *ob, ViewLayer *view_layer);
34  Object *ob,
35  ViewLayer *view_layer);
36 int bc_is_marked(Object *ob);
37 void bc_remove_mark(Object *ob);
38 void bc_set_mark(Object *ob);
39 
40 #ifdef __cplusplus
41 }
42 
43 class BlenderContext {
44  private:
47  Scene *scene;
48  ViewLayer *view_layer;
49  Main *main;
50 
51  public:
52  BlenderContext(bContext *C);
53  bContext *get_context();
54  Depsgraph *get_depsgraph();
55  Scene *get_scene();
56  Scene *get_evaluated_scene();
57  Object *get_evaluated_object(Object *ob);
58  ViewLayer *get_view_layer();
59  Main *get_main();
60 };
61 #endif
static const BC_global_forward_axis BC_DEFAULT_FORWARD
void bc_remove_mark(Object *ob)
Object * bc_get_highest_exported_ancestor_or_self(LinkNode *export_set, Object *ob, ViewLayer *view_layer)
int bc_is_marked(Object *ob)
static const BC_global_up_axis BC_DEFAULT_UP
bool bc_is_in_Export_set(LinkNode *export_set, Object *ob, ViewLayer *view_layer)
void bc_set_mark(Object *ob)
bool bc_is_base_node(LinkNode *export_set, Object *ob, ViewLayer *view_layer)
BC_global_up_axis
Definition: BlenderTypes.h:24
@ BC_GLOBAL_UP_Z
Definition: BlenderTypes.h:27
BC_global_forward_axis
Definition: BlenderTypes.h:15
@ BC_GLOBAL_FORWARD_Y
Definition: BlenderTypes.h:17
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
Object is a sort of wrapper for general info.
#define C
Definition: RandGen.cpp:25
int main(int argc, char *argv[])
Scene scene
const Depsgraph * depsgraph
Definition: BKE_main.h:121