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
6afd515e
Commit
6afd515e
authored
13 years ago
by
Daniel M. Basso
Browse files
Options
Downloads
Patches
Plain Diff
Fixed importing float c3d files with non-native endianness.
parent
0fcd60fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
io_anim_c3d/__init__.py
+1
-1
1 addition, 1 deletion
io_anim_c3d/__init__.py
io_anim_c3d/c3d.py
+12
-1
12 additions, 1 deletion
io_anim_c3d/c3d.py
with
13 additions
and
2 deletions
io_anim_c3d/__init__.py
+
1
−
1
View file @
6afd515e
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
bl_info
=
{
bl_info
=
{
'
name
'
:
"
C3D Graphics Lab Motion Capture file (.c3d)
"
,
'
name
'
:
"
C3D Graphics Lab Motion Capture file (.c3d)
"
,
'
author
'
:
"
Daniel Monteiro Basso <daniel@basso.inf.br>
"
,
'
author
'
:
"
Daniel Monteiro Basso <daniel@basso.inf.br>
"
,
'
version
'
:
(
2011
,
11
,
2
,
1
),
'
version
'
:
(
2011
,
11
,
3
,
1
),
'
blender
'
:
(
2
,
6
,
0
),
'
blender
'
:
(
2
,
6
,
0
),
'
api
'
:
41226
,
'
api
'
:
41226
,
'
location
'
:
"
File > Import
"
,
'
location
'
:
"
File > Import
"
,
...
...
This diff is collapsed.
Click to expand it.
io_anim_c3d/c3d.py
+
12
−
1
View file @
6afd515e
...
@@ -169,7 +169,10 @@ class MarkerSet:
...
@@ -169,7 +169,10 @@ class MarkerSet:
self
.
frameRate
)
=
struct
.
unpack
(
'
fhhf
'
,
td
)
self
.
frameRate
)
=
struct
.
unpack
(
'
fhhf
'
,
td
)
self
.
scale
*=
scale
self
.
scale
*=
scale
if
self
.
scale
<
0
:
if
self
.
scale
<
0
:
self
.
readMarker
=
self
.
readFloatMarker
if
self
.
procType
==
2
:
self
.
readMarker
=
self
.
readFloatMarkerInvOrd
else
:
self
.
readMarker
=
self
.
readFloatMarker
self
.
scale
*=
-
1
self
.
scale
*=
-
1
else
:
else
:
self
.
readMarker
=
self
.
readShortMarker
self
.
readMarker
=
self
.
readShortMarker
...
@@ -203,6 +206,14 @@ class MarkerSet:
...
@@ -203,6 +206,14 @@ class MarkerSet:
m
.
position
=
(
x
*
self
.
scale
,
y
*
self
.
scale
,
z
*
self
.
scale
)
m
.
position
=
(
x
*
self
.
scale
,
y
*
self
.
scale
,
z
*
self
.
scale
)
return
m
return
m
def
readFloatMarkerInvOrd
(
self
,
infile
):
m
=
Marker
()
inv
=
lambda
f
:
f
[
2
:]
+
f
[:
2
]
i
=
lambda
:
inv
(
infile
.
read
(
4
))
x
,
y
,
z
,
m
.
confidence
=
struct
.
unpack
(
'
ffff
'
,
i
()
+
i
()
+
i
()
+
i
())
m
.
position
=
(
x
*
self
.
scale
,
y
*
self
.
scale
,
z
*
self
.
scale
)
return
m
def
readShortMarker
(
self
,
infile
):
def
readShortMarker
(
self
,
infile
):
m
=
Marker
()
m
=
Marker
()
x
,
y
,
z
,
m
.
confidence
=
struct
.
unpack
(
'
hhhh
'
,
infile
.
read
(
8
))
x
,
y
,
z
,
m
.
confidence
=
struct
.
unpack
(
'
hhhh
'
,
infile
.
read
(
8
))
...
...
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