Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons-contrib
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons-contrib
Commits
b1f4e358
Commit
b1f4e358
authored
Feb 12, 2014
by
Eugenio Pignataro
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Improve memory usage
parent
e7f39665
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
oscurart_mesh_cache_tools.py
+6
-11
6 additions, 11 deletions
oscurart_mesh_cache_tools.py
with
6 additions
and
11 deletions
oscurart_mesh_cache_tools.py
+
6
−
11
View file @
b1f4e358
...
@@ -60,7 +60,6 @@ def OscFuncExportPc2(self):
...
@@ -60,7 +60,6 @@ def OscFuncExportPc2(self):
folderpath
=
bpy
.
context
.
scene
.
muu_pc2_folder
folderpath
=
bpy
.
context
.
scene
.
muu_pc2_folder
for
ob
in
bpy
.
data
.
groups
[
bpy
.
context
.
scene
.
muu_pc2_group
].
objects
[:]:
for
ob
in
bpy
.
data
.
groups
[
bpy
.
context
.
scene
.
muu_pc2_group
].
objects
[:]:
pc2list
=
[]
bpy
.
context
.
window_manager
.
progress_begin
(
0
,
100
)
#progressbar
bpy
.
context
.
window_manager
.
progress_begin
(
0
,
100
)
#progressbar
if
ob
.
type
==
"
MESH
"
:
if
ob
.
type
==
"
MESH
"
:
with
open
(
"
%s/%s.pc2
"
%
(
os
.
path
.
normpath
(
folderpath
),
ob
.
name
),
mode
=
"
wb
"
)
as
file
:
with
open
(
"
%s/%s.pc2
"
%
(
os
.
path
.
normpath
(
folderpath
),
ob
.
name
),
mode
=
"
wb
"
)
as
file
:
...
@@ -88,24 +87,20 @@ def OscFuncExportPc2(self):
...
@@ -88,24 +87,20 @@ def OscFuncExportPc2(self):
me
.
calc_normals
()
me
.
calc_normals
()
#creo archivo
#creo archivo
for
vert
in
me
.
vertices
[:]:
for
vert
in
me
.
vertices
[:]:
pc2list
.
append
(
(
i
=
(
float
(
vert
.
co
[
0
]),
float
(
vert
.
co
[
0
]),
float
(
vert
.
co
[
1
]),
float
(
vert
.
co
[
1
]),
float
(
vert
.
co
[
2
])
float
(
vert
.
co
[
2
])
))
)
file
.
write
(
struct
.
pack
(
"
<3f
"
,
*
i
))
#dreno mesh
#dreno mesh
bpy
.
data
.
meshes
.
remove
(
me
)
bpy
.
data
.
meshes
.
remove
(
me
)
print
(
"
%s Bake finished!
\n
Awaiting Compile file...
"
%
(
ob
.
name
))
print
(
"
%s Bake finished!
"
%
(
ob
.
name
))
# write file
for
i
,
frame
in
enumerate
(
pc2list
):
file
.
write
(
struct
.
pack
(
"
<3f
"
,
*
frame
))
print
(
"
%s File Compiled Write finished!
"
%
(
ob
.
name
))
del
(
pc2list
)
bpy
.
context
.
window_manager
.
progress_end
()
#progressBarClose
bpy
.
context
.
window_manager
.
progress_end
()
#progressBarClose
print
(
"
Bake Finished!
"
)
print
(
"
Bake
Totally
Finished!
"
)
class
OscPc2ExporterBatch
(
bpy
.
types
.
Operator
):
class
OscPc2ExporterBatch
(
bpy
.
types
.
Operator
):
bl_idname
=
"
export_shape.pc2_selection
"
bl_idname
=
"
export_shape.pc2_selection
"
...
...
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