Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenMesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenMesh
OpenMesh
Commits
44cb2ebc
Commit
44cb2ebc
authored
Feb 11, 2016
by
Jan Möbius
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OBJ material files and face color (Thanks to Sven-Kristofer Pilz for the patch)
parent
d43d7d21
Pipeline
#878
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/OpenMesh/Core/IO/writer/OBJWriter.cc
src/OpenMesh/Core/IO/writer/OBJWriter.cc
+3
-3
No files found.
src/OpenMesh/Core/IO/writer/OBJWriter.cc
View file @
44cb2ebc
...
...
@@ -118,7 +118,7 @@ write(const std::string& _filename, BaseExporter& _be, Options _opt, std::stream
dot
=
_filename
.
find_last_of
(
"."
);
if
(
dot
!=
std
::
string
::
npos
)
objName_
=
objName_
.
substr
(
0
,
dot
-
1
);
objName_
=
objName_
.
substr
(
0
,
dot
);
}
bool
result
=
write
(
out
,
_be
,
_opt
,
_precision
);
...
...
@@ -184,7 +184,7 @@ writeMaterial(std::ostream& _out, BaseExporter& _be, Options _opt) const
for
(
size_t
i
=
0
;
i
<
materialA_
.
size
();
i
++
){
_out
<<
"newmtl "
<<
"mat"
<<
i
<<
'\n'
;
_out
<<
"Ka 0.5000 0.5000 0.5000"
<<
'\n'
;
_out
<<
"Kd "
<<
materialA_
[
i
][
0
]
<<
materialA_
[
i
][
1
]
<<
materialA_
[
i
][
2
]
<<
'\n'
;
;
_out
<<
"Kd "
<<
materialA_
[
i
][
0
]
<<
' '
<<
materialA_
[
i
][
1
]
<<
' '
<<
materialA_
[
i
][
2
]
<<
'\n'
;
_out
<<
"Tr "
<<
materialA_
[
i
][
3
]
<<
'\n'
;
_out
<<
"illum 1"
<<
'\n'
;
}
...
...
@@ -192,7 +192,7 @@ writeMaterial(std::ostream& _out, BaseExporter& _be, Options _opt) const
for
(
size_t
i
=
0
;
i
<
material_
.
size
();
i
++
){
_out
<<
"newmtl "
<<
"mat"
<<
i
<<
'\n'
;
_out
<<
"Ka 0.5000 0.5000 0.5000"
<<
'\n'
;
_out
<<
"Kd "
<<
material_
[
i
][
0
]
<<
material_
[
i
][
1
]
<<
material_
[
i
][
2
]
<<
'\n'
;
;
_out
<<
"Kd "
<<
material_
[
i
][
0
]
<<
' '
<<
material_
[
i
][
1
]
<<
' '
<<
material_
[
i
][
2
]
<<
'\n'
;
_out
<<
"illum 1"
<<
'\n'
;
}
...
...
Jan Möbius
@moebius
mentioned in commit
cef38aac
·
Mar 23, 2016
mentioned in commit
cef38aac
mentioned in commit cef38aacc9211998678c7fe7bbed560be7223329
Toggle commit list
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