|
3 | 3 | from os import system |
4 | 4 | from .ds_fbx import (ds_fbx_export,) |
5 | 5 |
|
6 | | -class ds_iclone_import_base(bpy.types.Operator): |
| 6 | +class ds_ic_import_base(bpy.types.Operator): |
7 | 7 |
|
8 | | - bl_idname = "ds_iclone.import_base" |
| 8 | + bl_idname = "ds_ic.import_base" |
9 | 9 | bl_label = "Import Base FBX." |
10 | 10 |
|
11 | 11 | def execute(self, context): |
12 | 12 |
|
13 | 13 | _export_name = bpy.path.basename(bpy.context.blend_data.filepath).replace('.blend','') |
14 | 14 | _export_path = bpy.path.abspath('//') + bpy.context.user_preferences.addons[__package__].preferences.option_export_folder + '\\' |
15 | | - system('copy "' + bpy.context.user_preferences.addons[__package__].preferences.option_iclone_templates_path + "Base.fbxkey" + '" "' + _export_path + _export_name + '.fbxkey"') |
| 15 | + system('copy "' + bpy.context.user_preferences.addons[__package__].preferences.option_ic_templates_path + "Base.fbxkey" + '" "' + _export_path + _export_name + '.fbxkey"') |
16 | 16 |
|
17 | | - bpy.ops.import_scene.fbx(filepath = bpy.context.user_preferences.addons[__package__].preferences.option_iclone_templates_path + "Base.fbx", axis_forward='-Z', axis_up='Y') |
| 17 | + bpy.ops.import_scene.fbx(filepath = bpy.context.user_preferences.addons[__package__].preferences.option_ic_templates_path + "Base.fbx", axis_forward='-Z', axis_up='Y') |
18 | 18 |
|
19 | 19 | return {'FINISHED'} |
20 | 20 |
|
21 | | -class ds_iclone_import_female(bpy.types.Operator): |
| 21 | +class ds_ic_import_female(bpy.types.Operator): |
22 | 22 |
|
23 | | - bl_idname = "ds_iclone.import_female" |
| 23 | + bl_idname = "ds_ic.import_female" |
24 | 24 | bl_label = "Import Base Female FBX." |
25 | 25 |
|
26 | 26 | def execute(self, context): |
27 | 27 |
|
28 | 28 | _export_name = bpy.path.basename(bpy.context.blend_data.filepath).replace('.blend','') |
29 | 29 | _export_path = bpy.path.abspath('//') + bpy.context.user_preferences.addons[__package__].preferences.option_export_folder + '\\' |
30 | | - system('copy "' + bpy.context.user_preferences.addons[__package__].preferences.option_iclone_templates_path + "Base Female.fbxkey" + '" "' + _export_path + _export_name + '.fbxkey"') |
| 30 | + system('copy "' + bpy.context.user_preferences.addons[__package__].preferences.option_ic_templates_path + "Base Female.fbxkey" + '" "' + _export_path + _export_name + '.fbxkey"') |
31 | 31 |
|
32 | | - bpy.ops.import_scene.fbx(filepath = bpy.context.user_preferences.addons[__package__].preferences.option_iclone_templates_path + "Base Female.fbx", axis_forward='-Z', axis_up='Y') |
| 32 | + bpy.ops.import_scene.fbx(filepath = bpy.context.user_preferences.addons[__package__].preferences.option_ic_templates_path + "Base Female.fbx", axis_forward='-Z', axis_up='Y') |
33 | 33 |
|
34 | 34 | return {'FINISHED'} |
35 | 35 |
|
36 | | -class ds_iclone_import_male(bpy.types.Operator): |
| 36 | +class ds_ic_import_male(bpy.types.Operator): |
37 | 37 |
|
38 | | - bl_idname = "ds_iclone.import_male" |
| 38 | + bl_idname = "ds_ic.import_male" |
39 | 39 | bl_label = "Import Base Male FBX." |
40 | 40 |
|
41 | 41 | def execute(self, context): |
42 | 42 |
|
43 | 43 | _export_name = bpy.path.basename(bpy.context.blend_data.filepath).replace('.blend','') |
44 | 44 | _export_path = bpy.path.abspath('//') + bpy.context.user_preferences.addons[__package__].preferences.option_export_folder + '\\' |
45 | | - system('copy "' + bpy.context.user_preferences.addons[__package__].preferences.option_iclone_templates_path + "Base Male.fbxkey" + '" "' + _export_path + _export_name + '.fbxkey"') |
| 45 | + system('copy "' + bpy.context.user_preferences.addons[__package__].preferences.option_ic_templates_path + "Base Male.fbxkey" + '" "' + _export_path + _export_name + '.fbxkey"') |
46 | 46 |
|
47 | | - bpy.ops.import_scene.fbx(filepath = bpy.context.user_preferences.addons[__package__].preferences.option_iclone_templates_path + "Base Male.fbx", axis_forward='-Z', axis_up='Y') |
| 47 | + bpy.ops.import_scene.fbx(filepath = bpy.context.user_preferences.addons[__package__].preferences.option_ic_templates_path + "Base Male.fbx", axis_forward='-Z', axis_up='Y') |
48 | 48 |
|
49 | 49 | return {'FINISHED'} |
50 | 50 |
|
51 | | -class ds_iclone_export_3dx(bpy.types.Operator): |
| 51 | +class ds_ic_export_3dx(bpy.types.Operator): |
52 | 52 |
|
53 | | - bl_idname = "ds_iclone.export_3dx" |
| 53 | + bl_idname = "ds_ic.export_3dx" |
54 | 54 | bl_label = "Export FBX and open in 3DXchange." |
55 | 55 |
|
56 | 56 | def execute(self, context): |
57 | 57 |
|
58 | 58 | export_file = ds_fbx_export(self, context) |
59 | 59 |
|
60 | | - Popen([bpy.context.user_preferences.addons[__package__].preferences.option_iclone_3dx_exe, export_file]) |
| 60 | + Popen([bpy.context.user_preferences.addons[__package__].preferences.option_ic_3dx_exe, export_file]) |
61 | 61 |
|
62 | 62 | return {'FINISHED'} |
63 | 63 |
|
64 | | -class ds_iclone_export_ic(bpy.types.Operator): |
| 64 | +class ds_ic_export_ic(bpy.types.Operator): |
65 | 65 |
|
66 | | - bl_idname = "ds_iclone.export_ic" |
| 66 | + bl_idname = "ds_ic.export_ic" |
67 | 67 | bl_label = "Open iClone." |
68 | 68 |
|
69 | 69 | def execute(self, context): |
70 | 70 |
|
71 | | - Popen([bpy.context.user_preferences.addons[__package__].preferences.option_iclone_exe]) |
| 71 | + Popen([bpy.context.user_preferences.addons[__package__].preferences.option_ic_exe]) |
72 | 72 |
|
73 | 73 | return {'FINISHED'} |
74 | 74 |
|
75 | | -class ds_iclone_export_cc(bpy.types.Operator): |
| 75 | +class ds_ic_export_cc(bpy.types.Operator): |
76 | 76 |
|
77 | | - bl_idname = "ds_iclone.export_cc" |
| 77 | + bl_idname = "ds_ic.export_cc" |
78 | 78 | bl_label = "Export FBX and Open Character Creator." |
79 | 79 |
|
80 | 80 | def execute(self, context): |
81 | 81 |
|
82 | 82 | export_file = ds_fbx_export(self, context) |
83 | 83 |
|
84 | | - Popen([bpy.context.user_preferences.addons[__package__].preferences.option_iclone_cc_exe]) |
| 84 | + Popen([bpy.context.user_preferences.addons[__package__].preferences.option_ic_cc_exe]) |
85 | 85 |
|
86 | 86 | return {'FINISHED'} |
87 | 87 |
|
88 | 88 | def register(): |
89 | 89 |
|
90 | 90 | from bpy.utils import register_class |
91 | 91 |
|
92 | | - register_class(ds_iclone_import_base) |
93 | | - register_class(ds_iclone_import_female) |
94 | | - register_class(ds_iclone_import_male) |
95 | | - register_class(ds_iclone_export_cc) |
96 | | - register_class(ds_iclone_export_3dx) |
97 | | - register_class(ds_iclone_export_ic) |
| 92 | + register_class(ds_ic_import_base) |
| 93 | + register_class(ds_ic_import_female) |
| 94 | + register_class(ds_ic_import_male) |
| 95 | + register_class(ds_ic_export_cc) |
| 96 | + register_class(ds_ic_export_3dx) |
| 97 | + register_class(ds_ic_export_ic) |
98 | 98 |
|
99 | 99 | def unregister(): |
100 | 100 |
|
101 | 101 | from bpy.utils import unregister_class |
102 | 102 |
|
103 | | - unregister_class(ds_iclone_import_base) |
104 | | - unregister_class(ds_iclone_import_female) |
105 | | - unregister_class(ds_iclone_import_male) |
106 | | - unregister_class(ds_iclone_export_cc) |
107 | | - unregister_class(ds_iclone_export_3dx) |
108 | | - unregister_class(ds_iclone_export_ic) |
| 103 | + unregister_class(ds_ic_import_base) |
| 104 | + unregister_class(ds_ic_import_female) |
| 105 | + unregister_class(ds_ic_import_male) |
| 106 | + unregister_class(ds_ic_export_cc) |
| 107 | + unregister_class(ds_ic_export_3dx) |
| 108 | + unregister_class(ds_ic_export_ic) |
0 commit comments