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
37db3924
Commit
37db3924
authored
13 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
revert some changes from r2917.
- remove additional axis args. - use of _TRANSFORM was incorrect.
parent
c5ed8141
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_scene_x3d/__init__.py
+8
-36
8 additions, 36 deletions
io_scene_x3d/__init__.py
io_scene_x3d/export_x3d.py
+10
-8
10 additions, 8 deletions
io_scene_x3d/export_x3d.py
with
18 additions
and
44 deletions
io_scene_x3d/__init__.py
+
8
−
36
View file @
37db3924
...
...
@@ -145,44 +145,20 @@ class ExportX3D(bpy.types.Operator, ExportHelper):
default
=
False
,
)
blender_
axis_forward
=
EnumProperty
(
name
=
"
Blender
Forward
"
,
axis_forward
=
EnumProperty
(
name
=
"
Forward
"
,
items
=
((
'
X
'
,
"
X Forward
"
,
""
),
(
'
Y
'
,
"
Y Forward
"
,
""
),
(
'
Z
'
,
"
Z Forward
"
,
""
),
(
'
-X
'
,
"
-X Forward
"
,
""
),
(
'
-Y
'
,
"
-Y Forward
"
,
""
),
(
'
-Z
'
,
"
-Z Forward
"
,
""
),
),
default
=
'
-Y
'
,
)
blender_axis_up
=
EnumProperty
(
name
=
"
Blender Up
"
,
items
=
((
'
X
'
,
"
X Up
"
,
""
),
(
'
Y
'
,
"
Y Up
"
,
""
),
(
'
Z
'
,
"
Z Up
"
,
""
),
(
'
-X
'
,
"
-X Up
"
,
""
),
(
'
-Y
'
,
"
-Y Up
"
,
""
),
(
'
-Z
'
,
"
-Z Up
"
,
""
),
),
default
=
'
Z
'
,
)
x3d_axis_forward
=
EnumProperty
(
name
=
"
X3D Forward
"
,
items
=
((
'
X
'
,
"
X Forward
"
,
""
),
(
'
Y
'
,
"
Y Forward
"
,
""
),
(
'
Z
'
,
"
Z Forward
"
,
""
),
(
'
-X
'
,
"
-X Forward
"
,
""
),
(
'
-Y
'
,
"
-Y Forward
"
,
""
),
(
'
-Z
'
,
"
-Z Forward
"
,
""
),
),
default
=
'
Z
'
,
)
x3d_axis_up
=
EnumProperty
(
name
=
"
X3D Up
"
,
axis_up
=
EnumProperty
(
name
=
"
Up
"
,
items
=
((
'
X
'
,
"
X Up
"
,
""
),
(
'
Y
'
,
"
Y Up
"
,
""
),
(
'
Z
'
,
"
Z Up
"
,
""
),
...
...
@@ -198,17 +174,13 @@ class ExportX3D(bpy.types.Operator, ExportHelper):
def
execute
(
self
,
context
):
from
.
import
export_x3d
keywords
=
self
.
as_keywords
(
ignore
=
(
"
blender_axis_forward
"
,
"
blender_axis_up
"
,
"
x3d_axis_forward
"
,
"
x3d_axis_up
"
,
keywords
=
self
.
as_keywords
(
ignore
=
(
"
axis_forward
"
,
"
axis_up
"
,
"
check_existing
"
,
"
filter_glob
"
,
))
global_matrix
=
axis_conversion
(
from_forward
=
self
.
blender_axis_forward
,
from_up
=
self
.
blender_axis_up
,
to_forward
=
self
.
x3d_axis_forward
,
to_up
=
self
.
x3d_axis_up
,
global_matrix
=
axis_conversion
(
to_forward
=
self
.
axis_forward
,
to_up
=
self
.
axis_up
,
).
to_4x4
()
keywords
[
"
global_matrix
"
]
=
global_matrix
...
...
This diff is collapsed.
Click to expand it.
io_scene_x3d/export_x3d.py
+
10
−
8
View file @
37db3924
...
...
@@ -187,7 +187,7 @@ def h3d_shader_glsl_frag_patch(filepath, scene, global_vars, frag_uniform_var_ma
lines
.
append
(
"
\n
"
)
elif
l
.
lstrip
().
startswith
(
"
lamp_visibility_other(
"
):
w
=
l
.
split
(
'
,
'
)
last_transform
=
w
[
1
]
+
_TRANSFORM
# XXX - HACK!!!
last_transform
=
w
[
1
]
+
"
_transform
"
# XXX - HACK!!!
w
[
1
]
=
'
(view_matrix * %s_transform * vec4(%s.x, %s.y, %s.z, 1.0)).xyz
'
%
(
w
[
1
],
w
[
1
],
w
[
1
],
w
[
1
])
l
=
"
,
"
.
join
(
w
)
elif
l
.
lstrip
().
startswith
(
"
lamp_visibility_sun_hemi(
"
):
...
...
@@ -282,13 +282,15 @@ def export(file,
# If names are not decorated, it may be possible for two objects to
# have the same name, so there has to be a unified dictionary to
# prevent uuid collisions.
uuid_cache_object
=
{}
# object
uuid_cache_lamp
=
uuid_cache_object
# 'LA_' + object.name
uuid_cache_view
=
uuid_cache_object
# object, different namespace
uuid_cache_mesh
=
uuid_cache_object
# mesh
uuid_cache_material
=
uuid_cache_object
# material
uuid_cache_image
=
uuid_cache_object
# image
uuid_cache_world
=
uuid_cache_object
# world
uuid_cache
=
{}
uuid_cache_object
=
uuid_cache
# object
uuid_cache_lamp
=
uuid_cache
# 'LA_' + object.name
uuid_cache_view
=
uuid_cache
# object, different namespace
uuid_cache_mesh
=
uuid_cache
# mesh
uuid_cache_material
=
uuid_cache
# material
uuid_cache_image
=
uuid_cache
# image
uuid_cache_world
=
uuid_cache
# world
del
uuid_cache
CA_
=
''
OB_
=
''
ME_
=
''
...
...
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