3D-Coat Applink: Cleanup, replace star imports

Bumped version to 3.5.22
Pep8 cleanup
Imports as tuples
Replace star imports
Update wiki link
No other functional changes
Only the init file is affected
This commit is contained in:
Vuk Gardašević 2017-07-23 15:51:15 +02:00
parent 88918dcef3
commit 0a26640d94
1 changed files with 133 additions and 98 deletions

View File

@ -19,12 +19,12 @@
bl_info = {
"name": "3D-Coat Applink",
"author": "Kalle-Samuli Riihikoski (haikalle)",
"version": (3, 5, 21),
"version": (3, 5, 22),
"blender": (2, 59, 0),
"location": "Scene > 3D-Coat Applink",
"description": "Transfer data between 3D-Coat/Blender",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Import-Export/3dcoat_applink",
"category": "Import-Export",
}
@ -39,7 +39,14 @@ else:
from . import tex
import bpy
from bpy.props import *
from bpy.types import PropertyGroup
from bpy.props import (
BoolProperty,
EnumProperty,
FloatVectorProperty,
StringProperty,
PointerProperty,
)
def register():
@ -48,133 +55,165 @@ def register():
bpy.coat3D['status'] = 0
bpy.coat3D['kuva'] = 1
class ObjectCoat3D(bpy.types.PropertyGroup):
objpath = StringProperty(name="Object_Path")
applink_name = StringProperty(name="Object_Applink_name")
coatpath = StringProperty(name="Coat_Path")
objectdir = StringProperty(name="ObjectPath", subtype="FILE_PATH")
objecttime = StringProperty(name="ObjectTime", subtype="FILE_PATH")
texturefolder = StringProperty(name="Texture folder:", subtype="DIR_PATH")
path3b = StringProperty(name="3B Path", subtype="FILE_PATH")
export_on = BoolProperty(name="Export_On", description="Add Modifiers and export",default= False)
dime = FloatVectorProperty(name="dime",description="Dimension")
loc = FloatVectorProperty(name="Location",description="Location")
rot = FloatVectorProperty(name="Rotation",description="Rotation",subtype='EULER')
sca = FloatVectorProperty(name="Scale",description="Scale")
class SceneCoat3D(bpy.types.PropertyGroup):
class ObjectCoat3D(PropertyGroup):
objpath = StringProperty(
name="Object_Path"
)
applink_name = StringProperty(
name="Object_Applink_name"
)
coatpath = StringProperty(
name="Coat_Path"
)
objectdir = StringProperty(
name="ObjectPath",
subtype="FILE_PATH"
)
objecttime = StringProperty(
name="ObjectTime",
subtype="FILE_PATH"
)
texturefolder = StringProperty(
name="Texture folder:",
subtype="DIR_PATH"
)
path3b = StringProperty(
name="3B Path",
subtype="FILE_PATH"
)
export_on = BoolProperty(
name="Export_On",
description="Add Modifiers and export",
default=False
)
dime = FloatVectorProperty(
name="dime",
description="Dimension"
)
loc = FloatVectorProperty(
name="Location",
description="Location"
)
rot = FloatVectorProperty(
name="Rotation",
description="Rotation",
subtype='EULER'
)
sca = FloatVectorProperty(
name="Scale",
description="Scale"
)
class SceneCoat3D(PropertyGroup):
defaultfolder = StringProperty(
name="FilePath",
subtype="DIR_PATH",
)
cursor_loc = FloatVectorProperty(name="Cursor_loc",description="location")
)
cursor_loc = FloatVectorProperty(
name="Cursor_loc",
description="location"
)
exchangedir = StringProperty(
name="FilePath",
subtype="DIR_PATH"
)
)
exchangefolder = StringProperty(
name="FilePath",
subtype="DIR_PATH"
)
)
wasactive = StringProperty(
name="Pass active object",
)
)
import_box = BoolProperty(
name="Import window",
description="Allows to skip import dialog",
default= True
)
default=True
)
exchange_found = BoolProperty(
name="Exchange Found",
description="Alert if Exchange folder is not found",
default= True
)
default=True
)
export_box = BoolProperty(
name="Export window",
description="Allows to skip export dialog",
default= True
)
default=True
)
export_color = BoolProperty(
name="Export color",
description="Export color texture",
default= True
)
default=True
)
export_spec = BoolProperty(
name="Export specular",
description="Export specular texture",
default= True
)
default=True
)
export_normal = BoolProperty(
name="Export Normal",
description="Export normal texture",
default= True
)
default=True
)
export_disp = BoolProperty(
name="Export Displacement",
description="Export displacement texture",
default= True
)
default=True
)
export_position = BoolProperty(
name="Export Source Position",
description="Export source position",
default= True
)
default=True
)
export_zero_layer = BoolProperty(
name="Export from Layer 0",
description="Export mesh from Layer 0",
default= True
)
default=True
)
export_coarse = BoolProperty(
name="Export Coarse",
description="Export Coarse",
default= True
)
default=True
)
exportfile = BoolProperty(
name="No Import File",
description="Add Modifiers and export",
default= False
)
default=False
)
importmod = BoolProperty(
name="Remove Modifiers",
description="Import and add modifiers",
default= False
)
default=False
)
exportmod = BoolProperty(
name="Modifiers",
description="Export modifiers",
default= False
)
default=False
)
export_pos = BoolProperty(
name="Remember Position",
description="Remember position",
default= True
)
default=True
)
importtextures = BoolProperty(
name="Bring Textures",
description="Import Textures",
default= True
)
default=True
)
importlevel = BoolProperty(
name="Multires. Level",
description="Bring Specific Multires Level",
default= False
)
default=False
)
exportover = BoolProperty(
name="Export Obj",
description="Import Textures",
default= False
)
default=False
)
importmesh = BoolProperty(
name="Mesh",
description="Import Mesh",
default= True
)
default=True
)
# copy location
cursor = FloatVectorProperty(
@ -182,62 +221,61 @@ def register():
description="Location",
subtype="XYZ",
default=(0.0, 0.0, 0.0)
)
)
loca = FloatVectorProperty(
name="location",
description="Location",
subtype="XYZ",
default=(0.0, 0.0, 0.0)
)
)
rota = FloatVectorProperty(
name="location",
description="Location",
subtype="EULER",
default=(0.0, 0.0, 0.0)
)
)
scal = FloatVectorProperty(
name="location",
description="Location",
subtype="XYZ",
default=(0.0, 0.0, 0.0)
)
)
dime = FloatVectorProperty(
name="dimension",
description="Dimension",
subtype="XYZ",
default=(0.0, 0.0, 0.0)
)
type = EnumProperty( name= "Export Type",
description= "Different Export Types",
items=(("ppp", "Per-Pixel Painting", ""),
("mv", "Microvertex Painting", ""),
("ptex", "Ptex Painting", ""),
("uv", "UV-Mapping", ""),
("ref", "Reference Mesh", ""),
("retopo", "Retopo mesh as new layer", ""),
("vox", "Mesh As Voxel Object", ""),
("alpha", "Mesh As New Pen Alpha", ""),
("prim", "Mesh As Voxel Primitive", ""),
)
type = EnumProperty(
name="Export Type",
description="Different Export Types",
items=(("ppp", "Per-Pixel Painting", ""),
("mv", "Microvertex Painting", ""),
("ptex", "Ptex Painting", ""),
("uv", "UV-Mapping", ""),
("ref", "Reference Mesh", ""),
("retopo", "Retopo mesh as new layer", ""),
("vox", "Mesh As Voxel Object", ""),
("alpha", "Mesh As New Pen Alpha", ""),
("prim", "Mesh As Voxel Primitive", ""),
("curv", "Mesh As a Curve Profile", ""),
("autopo", "Mesh For Auto-retopology", ""),
("autopo", "Mesh For Auto-retopology", ""),
),
default= "ppp"
)
default="ppp"
)
bpy.utils.register_module(__name__)
bpy.types.Object.coat3D= PointerProperty(
name= "Applink Variables",
type= ObjectCoat3D,
description= "Applink variables"
)
bpy.types.Scene.coat3D= PointerProperty(
name= "Applink Variables",
type= SceneCoat3D,
description= "Applink variables"
)
bpy.types.Object.coat3D = PointerProperty(
name="Applink Variables",
type=ObjectCoat3D,
description="Applink variables"
)
bpy.types.Scene.coat3D = PointerProperty(
name="Applink Variables",
type=SceneCoat3D,
description="Applink variables"
)
def unregister():
@ -252,6 +290,3 @@ def unregister():
if __name__ == "__main__":
register()