Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/collada/BlenderContext.cpp')
-rw-r--r--source/blender/collada/BlenderContext.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/source/blender/collada/BlenderContext.cpp b/source/blender/collada/BlenderContext.cpp
new file mode 100644
index 00000000000..536d517bd6e
--- /dev/null
+++ b/source/blender/collada/BlenderContext.cpp
@@ -0,0 +1,61 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Gaia Clary,
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+ /** \file CameraExporter.h
+ * \ingroup collada
+ */
+
+#include "BlenderContext.h"
+
+BlenderContext::BlenderContext(bContext *C)
+{
+ context = C;
+ main = CTX_data_main(C);
+ depsgraph = CTX_data_depsgraph(C);
+ scene = CTX_data_scene(C);
+ view_layer = DEG_get_evaluated_view_layer(depsgraph);
+}
+
+bContext *BlenderContext::get_context()
+{
+ return context;
+}
+
+Depsgraph *BlenderContext::get_depsgraph()
+{
+ return depsgraph;
+}
+
+Scene *BlenderContext::get_scene()
+{
+ return scene;
+}
+
+ViewLayer *BlenderContext::get_view_layer()
+{
+ return view_layer;
+}
+
+Main *BlenderContext::get_main()
+{
+ return main;
+}