Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
525dd716
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
525dd716
编写于
4月 30, 2012
作者:
T
tim baker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
blender renamed mesh.faces to mesh.tessfaces
上级
269dd2e0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
5 deletion
+11
-5
utils/exporters/blender/2.62/scripts/addons/io_mesh_threejs/export_threejs.py
...der/2.62/scripts/addons/io_mesh_threejs/export_threejs.py
+11
-5
未找到文件。
utils/exporters/blender/2.62/scripts/addons/io_mesh_threejs/export_threejs.py
浏览文件 @
525dd716
...
...
@@ -192,7 +192,7 @@ TEMPLATE_CAMERA_ORTHO = """\
TEMPLATE_LIGHT_DIRECTIONAL
=
"""
\
%(light_id)s: {
"type"
: "directional",
"type"
: "directional",
"direction" : %(direction)s,
"color" : %(color)d,
"intensity" : %(intensity).2f
...
...
@@ -276,6 +276,12 @@ def veckey3d(v):
def
veckey2d
(
v
):
return
round
(
v
[
0
],
6
),
round
(
v
[
1
],
6
)
def
get_faces
(
obj
):
if
hasattr
(
obj
,
"tessfaces"
):
return
obj
.
tessfaces
else
:
return
obj
.
faces
def
get_normal_indices
(
v
,
normals
,
mesh
):
n
=
[]
mv
=
mesh
.
vertices
...
...
@@ -481,7 +487,7 @@ def generate_faces(normals, uvs, colors, meshes, option_normals, option_colors,
if
not
active_col_layer
:
mesh_extract_colors
=
False
for
i
,
f
in
enumerate
(
mesh
.
faces
):
for
i
,
f
in
enumerate
(
get_faces
(
mesh
)
):
face
=
generate_face
(
f
,
i
,
normals
,
uvs
,
colors
,
mesh
,
option_normals
,
mesh_colors
,
mesh_uvs
,
option_materials
,
vertex_offset
,
material_offset
)
chunks
.
append
(
face
)
...
...
@@ -574,7 +580,7 @@ def generate_face(f, faceIndex, normals, uvs, colors, mesh, option_normals, opti
# #####################################################
def
extract_vertex_normals
(
mesh
,
normals
,
count
):
for
f
in
mesh
.
faces
:
for
f
in
get_faces
(
mesh
)
:
for
v
in
f
.
vertices
:
normal
=
mesh
.
vertices
[
v
].
normal
...
...
@@ -603,7 +609,7 @@ def generate_normals(normals, option_normals):
def
extract_vertex_colors
(
mesh
,
colors
,
count
):
color_layer
=
mesh
.
vertex_colors
.
active
.
data
for
face_index
,
face
in
enumerate
(
mesh
.
faces
):
for
face_index
,
face
in
enumerate
(
get_faces
(
mesh
)
):
face_colors
=
color_layer
[
face_index
]
face_colors
=
face_colors
.
color1
,
face_colors
.
color2
,
face_colors
.
color3
,
face_colors
.
color4
...
...
@@ -633,7 +639,7 @@ def generate_vertex_colors(colors, option_colors):
def
extract_uvs
(
mesh
,
uvs
,
count
):
uv_layer
=
mesh
.
uv_textures
.
active
.
data
for
face_index
,
face
in
enumerate
(
mesh
.
faces
):
for
face_index
,
face
in
enumerate
(
get_faces
(
mesh
)
):
for
uv_index
,
uv
in
enumerate
(
uv_layer
[
face_index
].
uv
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录