|
20 | 20 | "name": "Pipeline", |
21 | 21 | "description": "3D Pipeline Tools", |
22 | 22 | "author": "Digiography.Studio", |
23 | | - "version": (0, 9, 0), |
| 23 | + "version": (0, 9, 5), |
24 | 24 | "blender": (2, 79, 0), |
25 | 25 | "location": "Info Toolbar, File -> Import, File -> Export", |
26 | 26 | "wiki_url": "https://github.com/Digiography/blender_addon_pipeline/wiki", |
@@ -83,7 +83,15 @@ class ds_pipeline_addon_prefs(bpy.types.AddonPreferences): |
83 | 83 | option_show_zbc = bpy.props.BoolProperty( |
84 | 84 | name="Show ZBrushCore Buttons", |
85 | 85 | default=True, |
86 | | - ) |
| 86 | + ) |
| 87 | + option_show_iclone_toggle = bpy.props.BoolProperty( |
| 88 | + name="iClone Toggle", |
| 89 | + default=True, |
| 90 | + ) |
| 91 | + option_show_iclone_toggle_state = bpy.props.BoolProperty( |
| 92 | + name="iClone Toggle Button State", |
| 93 | + default=False, |
| 94 | + ) |
87 | 95 | option_show_ic = bpy.props.BoolProperty( |
88 | 96 | name="Show iClone Buttons", |
89 | 97 | default=True, |
@@ -191,21 +199,26 @@ def Draw_Pipeline_Menu(self, context): |
191 | 199 | layout = self.layout |
192 | 200 | layout.menu(Pipeline_Menu.bl_idname,icon="EXPORT") |
193 | 201 |
|
194 | | -def get_export_path(): |
195 | | - |
196 | | - _export_path = bpy.path.abspath('//') + bpy.context.user_preferences.addons[__package__].preferences.option_export_folder + '\\' |
197 | | - |
198 | | - if not path.exists(_export_path): |
199 | | - makedirs(_export_path) |
| 202 | +class ds_pipeline_iclone_toggle(bpy.types.Operator): |
| 203 | + bl_idname = "ds_pipeline.iclone_toggle" |
| 204 | + bl_label = "iClone" |
| 205 | + bl_space_type = 'PROPERTIES' |
| 206 | + bl_region_type = 'WINDOW' |
| 207 | + def execute(self, context): |
200 | 208 |
|
201 | | - return _export_path |
| 209 | + if not bpy.context.user_preferences.addons[__package__].preferences.option_show_iclone_toggle_state: |
| 210 | + bpy.context.user_preferences.addons[__package__].preferences.option_show_iclone_toggle_state=True |
| 211 | + else: |
| 212 | + bpy.context.user_preferences.addons[__package__].preferences.option_show_iclone_toggle_state=False |
| 213 | + return {'FINISHED'} |
202 | 214 |
|
203 | 215 | def register(): |
204 | 216 |
|
205 | 217 | from bpy.utils import register_class |
206 | 218 |
|
207 | 219 | register_class(ds_pipeline_addon_prefs) |
208 | 220 | register_class(ds_pipeline_prefs_open) |
| 221 | + register_class(ds_pipeline_iclone_toggle) |
209 | 222 |
|
210 | 223 | from . import ds_obj |
211 | 224 | from . import ds_fbx |
@@ -244,6 +257,7 @@ def unregister(): |
244 | 257 |
|
245 | 258 | unregister_class(ds_pipeline_addon_prefs) |
246 | 259 | unregister_class(ds_pipeline_prefs_open) |
| 260 | + unregister_class(ds_pipeline_iclone_toggle) |
247 | 261 |
|
248 | 262 | from . import ds_obj |
249 | 263 | from . import ds_fbx |
|
0 commit comments