Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Courses
Scotty3D
Commits
a9cca557
Commit
a9cca557
authored
Nov 21, 2020
by
TheNumbat
Browse files
fix writing spheres with no mesh data
parent
5ecaca3a
Changes
1
Show whitespace changes
Inline
Side-by-side
src/scene/scene.cpp
View file @
a9cca557
...
...
@@ -443,6 +443,7 @@ static void load_node(Scene &scobj, std::vector<std::string> &errors,
Skeleton
&
skeleton
=
new_obj
.
armature
;
aiNode
*
arm_node
=
mesh
->
mBones
[
0
]
->
mArmature
;
if
(
arm_node
)
{
{
aiVector3D
t
,
r
,
s
;
arm_node
->
mTransformation
.
Decompose
(
s
,
r
,
t
);
...
...
@@ -486,6 +487,7 @@ static void load_node(Scene &scobj, std::vector<std::string> &errors,
build_tree
(
root
,
root_node
->
mChildren
[
k
]);
}
}
}
node_to_obj
[
node
]
=
new_obj
.
id
();
scobj
.
add
(
std
::
move
(
new_obj
));
...
...
@@ -919,7 +921,7 @@ std::string Scene::write(std::string file, const Camera &render_cam,
face_idx
++
;
}
}
else
if
(
obj
.
opt
.
shape_type
==
PT
::
Shape_Type
::
none
)
{
}
else
{
const
auto
&
verts
=
obj
.
mesh
().
verts
();
const
auto
&
elems
=
obj
.
mesh
().
indices
();
...
...
@@ -946,6 +948,7 @@ std::string Scene::write(std::string file, const Camera &render_cam,
face
.
mIndices
[
1
]
=
elems
[
i
+
1
];
face
.
mIndices
[
2
]
=
elems
[
i
+
2
];
}
}
std
::
string
name
(
obj
.
opt
.
name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment