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:
authorIyad Ahmed <iyadahmed430@gmail.com>2022-06-06 20:57:38 +0300
committerAras Pranckevicius <aras@nesnausk.org>2022-06-06 20:57:38 +0300
commit7c511f1b47d857f37aa36ee6ed8107cb88eb5c39 (patch)
treed376a5e21bc21f40e0b062f9623887f4018ed61a /source/blender/io/common
parent14fc89f38f0e3ce00e4fd6fffd72eea5d998af5a (diff)
STL: Add new C++ based STL importer
A new experimentatl STL importer, written in C++. Roughly 7-9x faster than the Python based one. Reviewed By: Aras Pranckevicius, Hans Goudey. Differential Revision: https://developer.blender.org/D14941
Diffstat (limited to 'source/blender/io/common')
-rw-r--r--source/blender/io/common/CMakeLists.txt3
-rw-r--r--source/blender/io/common/IO_orientation.h16
-rw-r--r--source/blender/io/common/intern/orientation.c14
3 files changed, 33 insertions, 0 deletions
diff --git a/source/blender/io/common/CMakeLists.txt b/source/blender/io/common/CMakeLists.txt
index e80bd850825..a6818c0bf5d 100644
--- a/source/blender/io/common/CMakeLists.txt
+++ b/source/blender/io/common/CMakeLists.txt
@@ -8,6 +8,7 @@ set(INC
../../depsgraph
../../makesdna
../../../../intern/guardedalloc
+ ../../makesrna
)
set(INC_SYS
@@ -19,12 +20,14 @@ set(SRC
intern/dupli_persistent_id.cc
intern/object_identifier.cc
intern/path_util.cc
+ intern/orientation.c
IO_abstract_hierarchy_iterator.h
IO_dupli_persistent_id.hh
IO_path_util.hh
IO_path_util_types.h
IO_types.h
+ IO_orientation.h
intern/dupli_parent_finder.hh
)
diff --git a/source/blender/io/common/IO_orientation.h b/source/blender/io/common/IO_orientation.h
new file mode 100644
index 00000000000..09fcbc7045c
--- /dev/null
+++ b/source/blender/io/common/IO_orientation.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#pragma once
+
+#include "RNA_types.h"
+
+typedef enum {
+ IO_AXIS_X = 0,
+ IO_AXIS_Y = 1,
+ IO_AXIS_Z = 2,
+ IO_AXIS_NEGATIVE_X = 3,
+ IO_AXIS_NEGATIVE_Y = 4,
+ IO_AXIS_NEGATIVE_Z = 5,
+} eIOAxis;
+
+extern const EnumPropertyItem io_transform_axis[];
diff --git a/source/blender/io/common/intern/orientation.c b/source/blender/io/common/intern/orientation.c
new file mode 100644
index 00000000000..0ffbaa8fe8e
--- /dev/null
+++ b/source/blender/io/common/intern/orientation.c
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include "RNA_types.h"
+
+#include "IO_orientation.h"
+
+const EnumPropertyItem io_transform_axis[] = {
+ {IO_AXIS_X, "X", 0, "X", "Positive X axis"},
+ {IO_AXIS_Y, "Y", 0, "Y", "Positive Y axis"},
+ {IO_AXIS_Z, "Z", 0, "Z", "Positive Z axis"},
+ {IO_AXIS_NEGATIVE_X, "NEGATIVE_X", 0, "-X", "Negative X axis"},
+ {IO_AXIS_NEGATIVE_Y, "NEGATIVE_Y", 0, "-Y", "Negative Y axis"},
+ {IO_AXIS_NEGATIVE_Z, "NEGATIVE_Z", 0, "-Z", "Negative Z axis"},
+ {0, NULL, 0, NULL, NULL}};