summaryrefslogtreecommitdiff
path: root/modules/csg
diff options
context:
space:
mode:
Diffstat (limited to 'modules/csg')
-rw-r--r--modules/csg/SCsub4
-rw-r--r--modules/csg/config.py3
-rw-r--r--modules/csg/csg_shape.cpp12
3 files changed, 9 insertions, 10 deletions
diff --git a/modules/csg/SCsub b/modules/csg/SCsub
index 57c504efd8..641a42c187 100644
--- a/modules/csg/SCsub
+++ b/modules/csg/SCsub
@@ -1,7 +1,7 @@
#!/usr/bin/env python
-Import('env')
-Import('env_modules')
+Import("env")
+Import("env_modules")
env_csg = env_modules.Clone()
diff --git a/modules/csg/config.py b/modules/csg/config.py
index 1634cbd7b4..9106cbceca 100644
--- a/modules/csg/config.py
+++ b/modules/csg/config.py
@@ -1,9 +1,11 @@
def can_build(env, platform):
return True
+
def configure(env):
pass
+
def get_doc_classes():
return [
"CSGBox3D",
@@ -17,5 +19,6 @@ def get_doc_classes():
"CSGTorus3D",
]
+
def get_doc_path():
return "doc_classes"
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 848b865efb..1ed48a573c 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -742,18 +742,14 @@ CSGBrush *CSGMesh3D::_build_brush() {
Vector<Vector3> anormals = arrays[Mesh::ARRAY_NORMAL];
const Vector3 *nr = NULL;
- bool nr_used = false;
if (anormals.size()) {
nr = anormals.ptr();
- nr_used = true;
}
Vector<Vector2> auvs = arrays[Mesh::ARRAY_TEX_UV];
const Vector2 *uvr = NULL;
- bool uvr_used = false;
if (auvs.size()) {
uvr = auvs.ptr();
- uvr_used = true;
}
Ref<Material> mat;
@@ -789,10 +785,10 @@ CSGBrush *CSGMesh3D::_build_brush() {
for (int k = 0; k < 3; k++) {
int idx = ir[j + k];
vertex[k] = vr[idx];
- if (nr_used) {
+ if (nr) {
normal[k] = nr[idx];
}
- if (uvr_used) {
+ if (uvr) {
uv[k] = uvr[idx];
}
}
@@ -832,10 +828,10 @@ CSGBrush *CSGMesh3D::_build_brush() {
for (int k = 0; k < 3; k++) {
vertex[k] = vr[j + k];
- if (nr_used) {
+ if (nr) {
normal[k] = nr[j + k];
}
- if (uvr_used) {
+ if (uvr) {
uv[k] = uvr[j + k];
}
}