Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
e0d9e360
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,发现更多精彩内容 >>
提交
e0d9e360
编写于
5月 08, 2015
作者:
R
rkusa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Blender: add option to disable modifier application
上级
25ffb41e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
1 deletion
+18
-1
utils/exporters/blender/addons/io_three/__init__.py
utils/exporters/blender/addons/io_three/__init__.py
+14
-0
utils/exporters/blender/addons/io_three/constants.py
utils/exporters/blender/addons/io_three/constants.py
+2
-0
utils/exporters/blender/addons/io_three/exporter/api/object.py
.../exporters/blender/addons/io_three/exporter/api/object.py
+2
-1
未找到文件。
utils/exporters/blender/addons/io_three/__init__.py
浏览文件 @
e0d9e360
...
@@ -301,6 +301,10 @@ def restore_export_settings(properties, settings):
...
@@ -301,6 +301,10 @@ def restore_export_settings(properties, settings):
constants
.
INFLUENCES_PER_VERTEX
,
constants
.
INFLUENCES_PER_VERTEX
,
constants
.
EXPORT_OPTIONS
[
constants
.
INFLUENCES_PER_VERTEX
])
constants
.
EXPORT_OPTIONS
[
constants
.
INFLUENCES_PER_VERTEX
])
properties
.
option_apply_modifiers
=
settings
.
get
(
constants
.
APPLY_MODIFIERS
,
constants
.
EXPORT_OPTIONS
[
constants
.
APPLY_MODIFIERS
])
properties
.
option_geometry_type
=
settings
.
get
(
properties
.
option_geometry_type
=
settings
.
get
(
constants
.
GEOMETRY_TYPE
,
constants
.
GEOMETRY_TYPE
,
constants
.
EXPORT_OPTIONS
[
constants
.
GEOMETRY_TYPE
])
constants
.
EXPORT_OPTIONS
[
constants
.
GEOMETRY_TYPE
])
...
@@ -424,6 +428,7 @@ def set_settings(properties):
...
@@ -424,6 +428,7 @@ def set_settings(properties):
constants
.
NORMALS
:
properties
.
option_normals
,
constants
.
NORMALS
:
properties
.
option_normals
,
constants
.
SKINNING
:
properties
.
option_skinning
,
constants
.
SKINNING
:
properties
.
option_skinning
,
constants
.
BONES
:
properties
.
option_bones
,
constants
.
BONES
:
properties
.
option_bones
,
constants
.
APPLY_MODIFIERS
:
properties
.
option_apply_modifiers
,
constants
.
GEOMETRY_TYPE
:
properties
.
option_geometry_type
,
constants
.
GEOMETRY_TYPE
:
properties
.
option_geometry_type
,
constants
.
MATERIALS
:
properties
.
option_materials
,
constants
.
MATERIALS
:
properties
.
option_materials
,
...
@@ -555,6 +560,12 @@ class ExportThree(bpy.types.Operator, ExportHelper):
...
@@ -555,6 +560,12 @@ class ExportThree(bpy.types.Operator, ExportHelper):
description
=
"Export bones"
,
description
=
"Export bones"
,
default
=
constants
.
EXPORT_OPTIONS
[
constants
.
BONES
])
default
=
constants
.
EXPORT_OPTIONS
[
constants
.
BONES
])
option_apply_modifiers
=
BoolProperty
(
name
=
"Apply Modifiers"
,
description
=
"Apply Modifiers to mesh objects"
,
default
=
constants
.
EXPORT_OPTIONS
[
constants
.
APPLY_MODIFIERS
]
)
option_scale
=
FloatProperty
(
option_scale
=
FloatProperty
(
name
=
"Scale"
,
name
=
"Scale"
,
description
=
"Scale vertices"
,
description
=
"Scale vertices"
,
...
@@ -751,6 +762,9 @@ class ExportThree(bpy.types.Operator, ExportHelper):
...
@@ -751,6 +762,9 @@ class ExportThree(bpy.types.Operator, ExportHelper):
row
.
prop
(
self
.
properties
,
'option_bones'
)
row
.
prop
(
self
.
properties
,
'option_bones'
)
row
.
prop
(
self
.
properties
,
'option_skinning'
)
row
.
prop
(
self
.
properties
,
'option_skinning'
)
row
=
layout
.
row
()
row
.
prop
(
self
.
properties
,
'option_apply_modifiers'
)
row
=
layout
.
row
()
row
=
layout
.
row
()
row
.
prop
(
self
.
properties
,
'option_geometry_type'
)
row
.
prop
(
self
.
properties
,
'option_geometry_type'
)
...
...
utils/exporters/blender/addons/io_three/constants.py
浏览文件 @
e0d9e360
...
@@ -44,6 +44,7 @@ FACES = 'faces'
...
@@ -44,6 +44,7 @@ FACES = 'faces'
NORMALS
=
'normals'
NORMALS
=
'normals'
BONES
=
'bones'
BONES
=
'bones'
UVS
=
'uvs'
UVS
=
'uvs'
APPLY_MODIFIERS
=
'applyModifiers'
COLORS
=
'colors'
COLORS
=
'colors'
MIX_COLORS
=
'mixColors'
MIX_COLORS
=
'mixColors'
SCALE
=
'scale'
SCALE
=
'scale'
...
@@ -95,6 +96,7 @@ EXPORT_OPTIONS = {
...
@@ -95,6 +96,7 @@ EXPORT_OPTIONS = {
VERTICES
:
True
,
VERTICES
:
True
,
NORMALS
:
True
,
NORMALS
:
True
,
UVS
:
True
,
UVS
:
True
,
APPLY_MODIFIERS
:
True
,
COLORS
:
False
,
COLORS
:
False
,
MATERIALS
:
False
,
MATERIALS
:
False
,
FACE_MATERIALS
:
False
,
FACE_MATERIALS
:
False
,
...
...
utils/exporters/blender/addons/io_three/exporter/api/object.py
浏览文件 @
e0d9e360
...
@@ -329,7 +329,8 @@ def extract_mesh(obj, options, recalculate=False):
...
@@ -329,7 +329,8 @@ def extract_mesh(obj, options, recalculate=False):
"""
"""
logger
.
debug
(
'object.extract_mesh(%s, %s)'
,
obj
,
options
)
logger
.
debug
(
'object.extract_mesh(%s, %s)'
,
obj
,
options
)
mesh_node
=
obj
.
to_mesh
(
context
.
scene
,
True
,
RENDER
)
apply_modifiers
=
options
.
get
(
constants
.
APPLY_MODIFIERS
,
True
)
mesh_node
=
obj
.
to_mesh
(
context
.
scene
,
apply_modifiers
,
RENDER
)
# transfer the geometry type to the extracted mesh
# transfer the geometry type to the extracted mesh
mesh_node
.
THREE_geometry_type
=
obj
.
data
.
THREE_geometry_type
mesh_node
.
THREE_geometry_type
=
obj
.
data
.
THREE_geometry_type
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录