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
e8e36e18
Commit
e8e36e18
authored
12 years ago
by
Bastien Montagne
Browse files
Options
Downloads
Patches
Plain Diff
Turned out only raw exporter had same bug...
Also, only calc_tessface() when needed, and use ExportHelper for RAW!
parent
b3b6179c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
io_mesh_ply/export_ply.py
+2
-1
2 additions, 1 deletion
io_mesh_ply/export_ply.py
io_mesh_raw/__init__.py
+5
-17
5 additions, 17 deletions
io_mesh_raw/__init__.py
io_mesh_raw/export_raw.py
+2
-0
2 additions, 0 deletions
io_mesh_raw/export_raw.py
with
9 additions
and
18 deletions
io_mesh_ply/export_ply.py
+
2
−
1
View file @
e8e36e18
...
...
@@ -66,7 +66,8 @@ def save(operator,
# mesh.transform(obj.matrix_world) # XXX
# Be sure tessface & co are available!
mesh
.
calc_tessface
()
if
not
mesh
.
tessfaces
and
mesh
.
polygons
:
mesh
.
calc_tessface
()
has_uv
=
(
len
(
mesh
.
tessface_uv_textures
)
>
0
)
has_uv_vertex
=
(
len
(
mesh
.
sticky
)
>
0
)
...
...
This diff is collapsed.
Click to expand it.
io_mesh_raw/__init__.py
+
5
−
17
View file @
e8e36e18
...
...
@@ -43,6 +43,7 @@ else:
import
bpy
from
bpy.props
import
StringProperty
,
BoolProperty
from
bpy_extras.io_utils
import
ExportHelper
class
RawImporter
(
bpy
.
types
.
Operator
):
...
...
@@ -67,20 +68,14 @@ class RawImporter(bpy.types.Operator):
return
{
'
RUNNING_MODAL
'
}
class
RawExporter
(
bpy
.
types
.
Operator
):
class
RawExporter
(
bpy
.
types
.
Operator
,
ExportHelper
):
'''
Save Raw triangle mesh data
'''
bl_idname
=
"
export_mesh.raw
"
bl_label
=
"
Export RAW
"
filepath
=
StringProperty
(
subtype
=
'
FILE_PATH
'
,
)
check_existing
=
BoolProperty
(
name
=
"
Check Existing
"
,
description
=
"
Check and warn on overwriting existing files
"
,
default
=
True
,
options
=
{
'
HIDDEN
'
},
)
filename_ext
=
"
.raw
"
filter_glob
=
StringProperty
(
default
=
"
*.raw
"
,
options
=
{
'
HIDDEN
'
})
apply_modifiers
=
BoolProperty
(
name
=
"
Apply Modifiers
"
,
description
=
"
Use transformed mesh data from each object
"
,
...
...
@@ -101,13 +96,6 @@ class RawExporter(bpy.types.Operator):
return
{
'
FINISHED
'
}
def
invoke
(
self
,
context
,
event
):
if
not
self
.
filepath
:
self
.
filepath
=
bpy
.
path
.
ensure_ext
(
bpy
.
data
.
filepath
,
"
.raw
"
)
wm
=
context
.
window_manager
wm
.
fileselect_add
(
self
)
return
{
'
RUNNING_MODAL
'
}
def
menu_import
(
self
,
context
):
self
.
layout
.
operator
(
RawImporter
.
bl_idname
,
text
=
"
Raw Faces (.raw)
"
)
...
...
This diff is collapsed.
Click to expand it.
io_mesh_raw/export_raw.py
+
2
−
0
View file @
e8e36e18
...
...
@@ -75,6 +75,8 @@ def write(filepath,
is_tmp_mesh
=
True
else
:
me
=
obj
.
data
if
not
me
.
tessfaces
and
me
.
polygons
:
me
.
calc_tessface
()
is_tmp_mesh
=
False
if
me
is
not
None
:
...
...
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