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
6b76a8c1
Commit
6b76a8c1
authored
14 years ago
by
Kalle-Samuli Riihikoski
Browse files
Options
Downloads
Patches
Plain Diff
Now you can export textures to other folder
parent
b6cedfd6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
io_coat3D/__init__.py
+61
-0
61 additions, 0 deletions
io_coat3D/__init__.py
io_coat3D/coat.py
+56
-9
56 additions, 9 deletions
io_coat3D/coat.py
io_coat3D/tex.py
+4
-1
4 additions, 1 deletion
io_coat3D/tex.py
with
121 additions
and
10 deletions
io_coat3D/__init__.py
+
61
−
0
View file @
6b76a8c1
...
...
@@ -77,6 +77,12 @@ def register():
default
=
""
)
coat3D
.
texturefolder
=
StringProperty
(
name
=
"
Texture folder:
"
,
subtype
=
"
DIR_PATH
"
,
default
=
""
)
class
coat3D
(
bpy
.
types
.
IDPropertyGroup
):
pass
...
...
@@ -98,6 +104,61 @@ def register():
default
=
""
)
coat3D
.
import_box
=
BoolProperty
(
name
=
"
Import window
"
,
description
=
"
Allows to skip import dialog.
"
,
default
=
True
)
coat3D
.
export_box
=
BoolProperty
(
name
=
"
Export window
"
,
description
=
"
Allows to skip export dialog.
"
,
default
=
True
)
coat3D
.
export_color
=
BoolProperty
(
name
=
"
Export color
"
,
description
=
"
Export color texture.
"
,
default
=
True
)
coat3D
.
export_spec
=
BoolProperty
(
name
=
"
Export specular
"
,
description
=
"
Export specular texture.
"
,
default
=
True
)
coat3D
.
export_normal
=
BoolProperty
(
name
=
"
Export Normal
"
,
description
=
"
Export normal texture.
"
,
default
=
True
)
coat3D
.
export_disp
=
BoolProperty
(
name
=
"
Export Displacement
"
,
description
=
"
Export displacement texture.
"
,
default
=
True
)
coat3D
.
export_position
=
BoolProperty
(
name
=
"
Export Source Position
"
,
description
=
"
Export source position.
"
,
default
=
True
)
coat3D
.
export_zero_layer
=
BoolProperty
(
name
=
"
Export from Layer 0
"
,
description
=
"
Export mesh from Layer 0
"
,
default
=
True
)
coat3D
.
export_coarse
=
BoolProperty
(
name
=
"
Export Coarse
"
,
description
=
"
Export Coarse.
"
,
default
=
True
)
coat3D
.
export_on
=
BoolProperty
(
name
=
"
Export_On
"
,
description
=
"
Add Modifiers and export.
"
,
...
...
This diff is collapsed.
Click to expand it.
io_coat3D/coat.py
+
56
−
9
View file @
6b76a8c1
...
...
@@ -36,7 +36,7 @@ class ObjectButtonsPanel():
bl_region_type
=
'
WINDOW
'
bl_context
=
"
object
"
class
SCENE_PT_
Borgleader
(
ObjectButtonsPanel
,
bpy
.
types
.
Panel
):
class
SCENE_PT_
Main
(
ObjectButtonsPanel
,
bpy
.
types
.
Panel
):
bl_label
=
"
3D-Coat Applink
"
bl_space_type
=
"
PROPERTIES
"
bl_region_type
=
"
WINDOW
"
...
...
@@ -105,7 +105,6 @@ class SCENE_PT_Borgleader(ObjectButtonsPanel,bpy.types.Panel):
row
=
layout
.
row
()
if
(
coat
[
'
status
'
]
==
1
):
row
.
label
(
text
=
"
Exchange Folder: connected
"
)
Blender_folder
=
(
"
%s%sBlender
"
%
(
coat3D
.
exchangedir
,
os
.
sep
))
Blender_export
=
Blender_folder
Blender_export
+=
(
'
%sexport.txt
'
%
(
os
.
sep
))
...
...
@@ -160,17 +159,58 @@ class SCENE_PT_Borgleader(ObjectButtonsPanel,bpy.types.Panel):
row
=
layout
.
row
()
row
.
label
(
text
=
"
Texture output folder:
"
)
row
=
layout
.
row
()
row
.
prop
(
coa
,
"
texturefolder
"
,
text
=
""
)
row
=
layout
.
row
()
if
(
coat
[
'
status
'
]
==
0
):
row
.
label
(
text
=
"
Exchange Folder: not connected
"
)
else
:
row
.
label
(
text
=
"
Exchange Folder: connected
"
)
class
SCENE_PT_Settings
(
ObjectButtonsPanel
,
bpy
.
types
.
Panel
):
bl_label
=
"
Applink Settings
"
bl_space_type
=
"
PROPERTIES
"
bl_region_type
=
"
WINDOW
"
bl_context
=
"
scene
"
def
draw
(
self
,
context
):
layout
=
self
.
layout
scene
=
context
.
scene
coat3D
=
bpy
.
context
.
scene
.
coat3D
row
=
layout
.
row
()
row
.
prop
(
coat3D
,
"
exchangedir
"
,
text
=
""
)
row
=
layout
.
row
()
colL
=
row
.
column
()
colR
=
row
.
column
()
colL
.
operator
(
"
import_applink.pilgway_3d_deltex
"
,
text
=
"
Del Tex
"
)
row
.
label
(
text
=
"
Exchange Folder:
"
)
row
=
layout
.
row
()
row
.
label
(
text
=
"
Author: haikalle@gmail.com
"
)
row
.
prop
(
coat3D
,
"
exchangedir
"
,
text
=
""
)
#row = layout.row()
#colL = row.column()
#colR = row.column()
#colL.prop(coat3D,"export_box")
#colR.prop(coat3D,"import_box")
#if(not(coat3D.export_box)):
# row = layout.row()
# colL.label(text="Export settings:")
# row = layout.row()
# colL = row.column()
# colR = row.column()
# colL.prop(coat3D,"export_color")
# colL.prop(coat3D,"export_spec")
# colL.prop(coat3D,"export_normal")
# colL.prop(coat3D,"export_disp")
# colR.prop(coat3D,"export_position")
# colR.prop(coat3D,"export_export_zero_layer")
# colR.prop(coat3D,"export_coarse")
#row = layout.row()
#colL = row.column()
#colR = row.column()
#colL.operator("import_applink.pilgway_3d_deltex",text="Delete Textures")
#row = layout.row()
#row.label(text="Author: haikalle@gmail.com")
class
SCENE_OT_export
(
bpy
.
types
.
Operator
):
...
...
@@ -232,6 +272,13 @@ class SCENE_OT_export(bpy.types.Operator):
file
.
write
(
"
%s
"
%
(
checkname
))
file
.
write
(
"
\n
%s
"
%
(
checkname
))
file
.
write
(
"
\n
[%s]
"
%
(
coat3D
.
type
))
if
(
coa
.
texturefolder
):
file
.
write
(
"
\n
[TexOutput:%s
"
%
(
coa
.
texturefolder
))
file
.
close
()
coa
.
objectdir
=
checkname
...
...
This diff is collapsed.
Click to expand it.
io_coat3D/tex.py
+
4
−
1
View file @
6b76a8c1
...
...
@@ -74,7 +74,10 @@ def gettex(mat_list, objekti, scene,export):
tex_slot
.
texture
.
image
.
reload
()
else
:
nimi
=
objname
(
coa
.
objectdir
)
osoite
=
os
.
path
.
dirname
(
coa
.
objectdir
)
+
os
.
sep
if
(
coa
.
texturefolder
):
osoite
=
os
.
path
.
dirname
(
coa
.
texturefolder
)
+
os
.
sep
else
:
osoite
=
os
.
path
.
dirname
(
coa
.
objectdir
)
+
os
.
sep
just_nimi
=
justname
(
nimi
)
just_nimi
+=
'
_
'
just_nimi_len
=
len
(
just_nimi
)
...
...
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