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
3e41f9e1
Commit
3e41f9e1
authored
13 years ago
by
Dalai Felinto
Browse files
Options
Downloads
Patches
Plain Diff
bmesh fix for ply i/o addon - using tessface_
parent
6b28346a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
io_mesh_ply/export_ply.py
+5
-5
5 additions, 5 deletions
io_mesh_ply/export_ply.py
io_mesh_ply/import_ply.py
+2
-2
2 additions, 2 deletions
io_mesh_ply/import_ply.py
with
7 additions
and
7 deletions
io_mesh_ply/export_ply.py
+
5
−
5
View file @
3e41f9e1
...
@@ -65,9 +65,9 @@ def save(operator,
...
@@ -65,9 +65,9 @@ def save(operator,
# mesh.transform(obj.matrix_world) # XXX
# mesh.transform(obj.matrix_world) # XXX
has_uv
=
(
len
(
mesh
.
uv_textures
)
>
0
)
has_uv
=
(
len
(
mesh
.
tessface_
uv_textures
)
>
0
)
has_uv_vertex
=
(
len
(
mesh
.
sticky
)
>
0
)
has_uv_vertex
=
(
len
(
mesh
.
sticky
)
>
0
)
has_vcol
=
len
(
mesh
.
vertex_colors
)
>
0
has_vcol
=
len
(
mesh
.
tessface_
vertex_colors
)
>
0
if
(
not
has_uv
)
and
(
not
has_uv_vertex
):
if
(
not
has_uv
)
and
(
not
has_uv_vertex
):
use_uv_coords
=
False
use_uv_coords
=
False
...
@@ -80,7 +80,7 @@ def save(operator,
...
@@ -80,7 +80,7 @@ def save(operator,
has_vcol
=
False
has_vcol
=
False
if
has_uv
:
if
has_uv
:
active_uv_layer
=
mesh
.
uv_textures
.
active
active_uv_layer
=
mesh
.
tessface_
uv_textures
.
active
if
not
active_uv_layer
:
if
not
active_uv_layer
:
use_uv_coords
=
False
use_uv_coords
=
False
has_uv
=
False
has_uv
=
False
...
@@ -88,7 +88,7 @@ def save(operator,
...
@@ -88,7 +88,7 @@ def save(operator,
active_uv_layer
=
active_uv_layer
.
data
active_uv_layer
=
active_uv_layer
.
data
if
has_vcol
:
if
has_vcol
:
active_col_layer
=
mesh
.
vertex_colors
.
active
active_col_layer
=
mesh
.
tessface_
vertex_colors
.
active
if
not
active_col_layer
:
if
not
active_col_layer
:
use_colors
=
False
use_colors
=
False
has_vcol
=
False
has_vcol
=
False
...
@@ -113,7 +113,7 @@ def save(operator,
...
@@ -113,7 +113,7 @@ def save(operator,
if
has_uv
:
if
has_uv
:
uv
=
active_uv_layer
[
i
]
uv
=
active_uv_layer
[
i
]
uv
=
uv
.
uv1
,
uv
.
uv2
,
uv
.
uv3
,
uv
.
uv4
# XXX - crufty :/
uv
=
uv
.
uv1
,
uv
.
uv2
,
uv
.
uv3
,
uv
.
uv4
if
has_vcol
:
if
has_vcol
:
col
=
active_col_layer
[
i
]
col
=
active_col_layer
[
i
]
col
=
col
.
color1
[:],
col
.
color2
[:],
col
.
color3
[:],
col
.
color4
[:]
col
=
col
.
color1
[:],
col
.
color2
[:],
col
.
color3
[:],
col
.
color4
[:]
...
...
This diff is collapsed.
Click to expand it.
io_mesh_ply/import_ply.py
+
2
−
2
View file @
3e41f9e1
...
@@ -296,9 +296,9 @@ def load_ply(filepath):
...
@@ -296,9 +296,9 @@ def load_ply(filepath):
if
uvindices
or
colindices
:
if
uvindices
or
colindices
:
if
uvindices
:
if
uvindices
:
uvlay
=
mesh
.
uv_textures
.
new
()
uvlay
=
mesh
.
tessface_
uv_textures
.
new
()
if
colindices
:
if
colindices
:
vcol_lay
=
mesh
.
vertex_colors
.
new
()
vcol_lay
=
mesh
.
tessface_
vertex_colors
.
new
()
if
uvindices
:
if
uvindices
:
for
i
,
f
in
enumerate
(
uvlay
.
data
):
for
i
,
f
in
enumerate
(
uvlay
.
data
):
...
...
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