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
10dd06be
Commit
10dd06be
authored
8 years ago
by
Eugenio Pignataro
Browse files
Options
Downloads
Patches
Plain Diff
remove obsolete tools
parent
fcf1957d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
oscurart_tools/__init__.py
+1
-6
1 addition, 6 deletions
oscurart_tools/__init__.py
oscurart_tools/oscurart_meshes.py
+0
-100
0 additions, 100 deletions
oscurart_tools/oscurart_meshes.py
with
1 addition
and
106 deletions
oscurart_tools/__init__.py
+
1
−
6
View file @
10dd06be
...
...
@@ -186,12 +186,7 @@ class OscPanelMesh(Panel):
colrow
.
operator
(
"
mesh.overlap_uv_faces
"
,
icon
=
"
UV_FACESEL
"
)
colrow
=
col
.
row
(
align
=
1
)
colrow
.
operator
(
"
view3d.modal_operator
"
,
icon
=
"
STICKY_UVS_DISABLE
"
)
colrow
=
col
.
row
(
align
=
1
)
colrow
.
operator
(
"
file.export_groups_osc
"
,
icon
=
'
GROUP_VCOL
'
)
colrow
.
operator
(
"
file.import_groups_osc
"
,
icon
=
'
GROUP_VCOL
'
)
colrow
=
col
.
row
(
align
=
1
)
colrow
.
operator
(
"
mesh.export_vertex_colors
"
,
icon
=
'
COLOR
'
)
colrow
.
operator
(
"
mesh.import_vertex_colors
"
,
icon
=
'
COLOR
'
)
class
OscPanelShapes
(
Panel
):
...
...
This diff is collapsed.
Click to expand it.
oscurart_tools/oscurart_meshes.py
+
0
−
100
View file @
10dd06be
...
...
@@ -176,60 +176,6 @@ class resymVertexGroups (Operator):
return
{
'
FINISHED
'
}
# ------------------------IMPORT EXPORT GROUPS--------------------
class
OscExportVG
(
Operator
):
bl_idname
=
"
file.export_groups_osc
"
bl_label
=
"
Export Groups
"
bl_options
=
{
"
REGISTER
"
,
"
UNDO
"
}
@classmethod
def
poll
(
cls
,
context
):
return
context
.
active_object
is
not
None
def
execute
(
self
,
context
):
ob
=
bpy
.
context
.
object
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
bpy
.
data
.
filepath
),
ob
.
name
+
"
.txt
"
),
mode
=
"
w
"
)
as
file
:
vgindex
=
{
vg
.
index
:
vg
.
name
for
vg
in
ob
.
vertex_groups
[:]}
vgdict
=
{}
for
vert
in
ob
.
data
.
vertices
:
for
vg
in
vert
.
groups
:
vgdict
.
setdefault
(
vg
.
group
,
[]).
append
(
(
vert
.
index
,
vg
.
weight
))
file
.
write
(
str
(
vgdict
)
+
"
\n
"
)
file
.
write
(
str
(
vgindex
))
return
{
'
FINISHED
'
}
class
OscImportVG
(
Operator
):
bl_idname
=
"
file.import_groups_osc
"
bl_label
=
"
Import Groups
"
bl_options
=
{
"
REGISTER
"
,
"
UNDO
"
}
@classmethod
def
poll
(
cls
,
context
):
return
context
.
active_object
is
not
None
def
execute
(
self
,
context
):
ob
=
bpy
.
context
.
object
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
bpy
.
data
.
filepath
),
ob
.
name
+
"
.txt
"
),
mode
=
"
r
"
)
as
file
:
vgdict
=
eval
(
file
.
readlines
(
1
)[
0
].
replace
(
"
\n
"
,
""
))
vgindex
=
eval
(
file
.
readlines
(
2
)[
0
].
replace
(
"
\n
"
,
""
))
for
index
,
name
in
vgindex
.
items
():
ob
.
vertex_groups
.
new
(
name
=
name
)
for
group
,
vdata
in
vgdict
.
items
():
for
index
,
weight
in
vdata
:
ob
.
vertex_groups
[
group
].
add
(
index
=
[
index
],
weight
=
weight
,
type
=
"
REPLACE
"
)
return
{
'
FINISHED
'
}
# ------------------------------------ RESYM MESH-------------------------
...
...
@@ -460,54 +406,8 @@ class OscOverlapUv(Operator):
DefOscOverlapUv
(
self
.
presicion
)
return
{
'
FINISHED
'
}
# ------------------------------- IO VERTEX COLORS --------------------
def
DefOscExportVC
():
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
bpy
.
data
.
filepath
),
bpy
.
context
.
object
.
name
)
+
"
.vc
"
,
mode
=
"
w
"
)
as
file
:
ob
=
bpy
.
context
.
object
di
=
{
loopind
:
ob
.
data
.
vertex_colors
.
active
.
data
[
loopind
].
color
[:]
for
face
in
ob
.
data
.
polygons
for
loopind
in
face
.
loop_indices
[:]}
file
.
write
(
str
(
di
))
def
DefOscImportVC
():
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
bpy
.
data
.
filepath
),
bpy
.
context
.
object
.
name
)
+
"
.vc
"
,
mode
=
"
r
"
)
as
file
:
di
=
eval
(
file
.
read
())
for
loopind
in
di
:
bpy
.
context
.
object
.
data
.
vertex_colors
.
active
.
data
[
loopind
].
color
=
di
[
loopind
]
class
OscExportVC
(
Operator
):
bl_idname
=
"
mesh.export_vertex_colors
"
bl_label
=
"
Export Vertex Colors
"
bl_options
=
{
"
REGISTER
"
,
"
UNDO
"
}
@classmethod
def
poll
(
cls
,
context
):
return
(
context
.
active_object
is
not
None
and
context
.
active_object
.
type
==
'
MESH
'
)
def
execute
(
self
,
context
):
DefOscExportVC
()
return
{
'
FINISHED
'
}
class
OscImportVC
(
Operator
):
bl_idname
=
"
mesh.import_vertex_colors
"
bl_label
=
"
Import Vertex Colors
"
bl_options
=
{
"
REGISTER
"
,
"
UNDO
"
}
@classmethod
def
poll
(
cls
,
context
):
return
(
context
.
active_object
is
not
None
and
context
.
active_object
.
type
==
'
MESH
'
)
def
execute
(
self
,
context
):
DefOscImportVC
()
return
{
'
FINISHED
'
}
# ------------------ PRINT VERTICES ----------------------
...
...
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