Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
eafdd141
Commit
eafdd141
authored
13 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
reverse stl export vector rotation order,
also clear temp meshes after export.
parent
3e9408cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
io_mesh_stl/blender_utils.py
+9
-3
9 additions, 3 deletions
io_mesh_stl/blender_utils.py
with
9 additions
and
3 deletions
io_mesh_stl/blender_utils.py
+
9
−
3
View file @
eafdd141
...
@@ -59,7 +59,9 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
...
@@ -59,7 +59,9 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
try
:
try
:
mesh
=
ob
.
to_mesh
(
bpy
.
context
.
scene
,
apply_modifier
,
"
PREVIEW
"
)
mesh
=
ob
.
to_mesh
(
bpy
.
context
.
scene
,
apply_modifier
,
"
PREVIEW
"
)
except
RuntimeError
:
except
RuntimeError
:
return
()
raise
StopIteration
mesh
.
transform
(
ob
.
matrix_world
)
if
triangulate
:
if
triangulate
:
# From a list of faces, return the face triangulated if needed.
# From a list of faces, return the face triangulated if needed.
...
@@ -76,5 +78,9 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
...
@@ -76,5 +78,9 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
for
face
in
mesh
.
faces
:
for
face
in
mesh
.
faces
:
yield
face
.
vertices
[:]
yield
face
.
vertices
[:]
return
([(
mesh
.
vertices
[
index
].
co
*
ob
.
matrix_world
)[:]
vertices
=
mesh
.
vertices
for
index
in
indexes
]
for
indexes
in
iter_face_index
())
for
indexes
in
iter_face_index
():
yield
[
vertices
[
index
].
co
.
copy
()
for
index
in
indexes
]
bpy
.
data
.
meshes
.
remove
(
mesh
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment