2020 "name" : "Pipeline" ,
2121 "description" : "3D Pipeline Tools" ,
2222 "author" : "Digiography.Studio" ,
23- "version" : (0 , 7 , 0 ),
23+ "version" : (0 , 7 , 5 ),
2424 "blender" : (2 , 79 , 0 ),
2525 "location" : "Properties > Scene, Info Toolbar, 3D View Toolbar" ,
2626 "wiki_url" : "https://github.com/Digiography/blender_addon_pipeline/wiki" ,
@@ -164,6 +164,14 @@ class ds_pipeline_addon_prefs(bpy.types.AddonPreferences):
164164 name = "Show Daz3D Button" ,
165165 default = True ,
166166 )
167+ option_show_open = bpy .props .BoolProperty (
168+ name = "Open Button" ,
169+ default = True ,
170+ )
171+ option_show_new = bpy .props .BoolProperty (
172+ name = "New Button" ,
173+ default = True ,
174+ )
167175 option_show_save = bpy .props .BoolProperty (
168176 name = "Save Button" ,
169177 default = True ,
@@ -224,15 +232,15 @@ class ds_pipeline_addon_prefs(bpy.types.AddonPreferences):
224232 name = "Menu Toggle" ,
225233 default = True ,
226234 )
227- option_show_menu_toggle_btn = bpy .props .BoolProperty (
235+ option_show_menu_toggle_state = bpy .props .BoolProperty (
228236 name = "Menu Toggle Button State" ,
229237 default = False ,
230238 )
231239 option_show_screens_toggle = bpy .props .BoolProperty (
232240 name = "Screens Toggle" ,
233241 default = True ,
234242 )
235- option_show_screens_toggle_btn = bpy .props .BoolProperty (
243+ option_show_screens_toggle_state = bpy .props .BoolProperty (
236244 name = "Screens Toggle Button State" ,
237245 default = False ,
238246 )
@@ -248,7 +256,14 @@ class ds_pipeline_addon_prefs(bpy.types.AddonPreferences):
248256 name = "Stats" ,
249257 default = False ,
250258 )
251-
259+ option_show_iclone_toggle = bpy .props .BoolProperty (
260+ name = "iClone Toggle" ,
261+ default = True ,
262+ )
263+ option_show_iclone_toggle_state = bpy .props .BoolProperty (
264+ name = "iClone Toggle Button State" ,
265+ default = False ,
266+ )
252267 def draw (self , context ):
253268
254269 layout = self .layout
@@ -279,6 +294,9 @@ def draw(self, context):
279294 box .label ('Show' ,icon = 'UI' )
280295 box .prop (self , 'option_show_menu_toggle' )
281296 box .prop (self , 'option_show_screens_toggle' )
297+ box .prop (self , 'option_show_iclone_toggle' )
298+ box .prop (self , 'option_show_new' )
299+ box .prop (self , 'option_show_open' )
282300 box .prop (self , 'option_show_save' )
283301 box .prop (self , 'option_show_save_as' )
284302 box .prop (self , 'option_show_fullscreen' )
@@ -345,10 +363,10 @@ class ds_pipeline_menu_toggle(bpy.types.Operator):
345363 bl_region_type = 'WINDOW'
346364 def execute (self , context ):
347365
348- if not bpy .context .user_preferences .addons [__package__ ].preferences .option_show_menu_toggle_btn :
349- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_menu_toggle_btn = True
366+ if not bpy .context .user_preferences .addons [__package__ ].preferences .option_show_menu_toggle_state :
367+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_menu_toggle_state = True
350368 else :
351- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_menu_toggle_btn = False
369+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_menu_toggle_state = False
352370 return {'FINISHED' }
353371
354372class ds_pipeline_screens_toggle (bpy .types .Operator ):
@@ -358,10 +376,23 @@ class ds_pipeline_screens_toggle(bpy.types.Operator):
358376 bl_region_type = 'WINDOW'
359377 def execute (self , context ):
360378
361- if not bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn :
362- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = True
379+ if not bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state :
380+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = True
363381 else :
364- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
382+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
383+ return {'FINISHED' }
384+
385+ class ds_pipeline_iclone_toggle (bpy .types .Operator ):
386+ bl_idname = "ds_pipeline.iclone_toggle"
387+ bl_label = "iClone"
388+ bl_space_type = 'PROPERTIES'
389+ bl_region_type = 'WINDOW'
390+ def execute (self , context ):
391+
392+ if not bpy .context .user_preferences .addons [__package__ ].preferences .option_show_iclone_toggle_state :
393+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_iclone_toggle_state = True
394+ else :
395+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_iclone_toggle_state = False
365396 return {'FINISHED' }
366397
367398class ds_pipeline_quit (bpy .types .Operator ):
@@ -393,7 +424,7 @@ class ds_pipeline_screen_3dview(bpy.types.Operator):
393424 bl_region_type = 'WINDOW'
394425 def execute (self , context ):
395426 bpy .context .window .screen = bpy .data .screens ['3D View Full' ]
396- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
427+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
397428 return {'FINISHED' }
398429class ds_pipeline_screen_anim (bpy .types .Operator ):
399430 bl_idname = "ds_pipeline.screen_anim"
@@ -402,7 +433,7 @@ class ds_pipeline_screen_anim(bpy.types.Operator):
402433 bl_region_type = 'WINDOW'
403434 def execute (self , context ):
404435 bpy .context .window .screen = bpy .data .screens ['Animation' ]
405- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
436+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
406437 return {'FINISHED' }
407438class ds_pipeline_screen_compositing (bpy .types .Operator ):
408439 bl_idname = "ds_pipeline.screen_compositing"
@@ -411,7 +442,7 @@ class ds_pipeline_screen_compositing(bpy.types.Operator):
411442 bl_region_type = 'WINDOW'
412443 def execute (self , context ):
413444 bpy .context .window .screen = bpy .data .screens ['Compositing' ]
414- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
445+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
415446 return {'FINISHED' }
416447class ds_pipeline_screen_default (bpy .types .Operator ):
417448 bl_idname = "ds_pipeline.screen_default"
@@ -420,7 +451,7 @@ class ds_pipeline_screen_default(bpy.types.Operator):
420451 bl_region_type = 'WINDOW'
421452 def execute (self , context ):
422453 bpy .context .window .screen = bpy .data .screens ['Default' ]
423- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
454+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
424455 return {'FINISHED' }
425456class ds_pipeline_screen_game (bpy .types .Operator ):
426457 bl_idname = "ds_pipeline.screen_game"
@@ -429,7 +460,7 @@ class ds_pipeline_screen_game(bpy.types.Operator):
429460 bl_region_type = 'WINDOW'
430461 def execute (self , context ):
431462 bpy .context .window .screen = bpy .data .screens ['Game Logic' ]
432- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
463+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
433464 return {'FINISHED' }
434465class ds_pipeline_screen_motion (bpy .types .Operator ):
435466 bl_idname = "ds_pipeline.screen_motion"
@@ -438,7 +469,7 @@ class ds_pipeline_screen_motion(bpy.types.Operator):
438469 bl_region_type = 'WINDOW'
439470 def execute (self , context ):
440471 bpy .context .window .screen = bpy .data .screens ['Motion Tracking' ]
441- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
472+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
442473 return {'FINISHED' }
443474class ds_pipeline_screen_scripting (bpy .types .Operator ):
444475 bl_idname = "ds_pipeline.screen_scripting"
@@ -447,7 +478,7 @@ class ds_pipeline_screen_scripting(bpy.types.Operator):
447478 bl_region_type = 'WINDOW'
448479 def execute (self , context ):
449480 bpy .context .window .screen = bpy .data .screens ['Scripting' ]
450- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
481+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
451482 return {'FINISHED' }
452483class ds_pipeline_screen_uv (bpy .types .Operator ):
453484 bl_idname = "ds_pipeline.screen_uv"
@@ -456,7 +487,7 @@ class ds_pipeline_screen_uv(bpy.types.Operator):
456487 bl_region_type = 'WINDOW'
457488 def execute (self , context ):
458489 bpy .context .window .screen = bpy .data .screens ['UV Editing' ]
459- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
490+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
460491 return {'FINISHED' }
461492class ds_pipeline_screen_video (bpy .types .Operator ):
462493 bl_idname = "ds_pipeline.screen_video"
@@ -465,7 +496,7 @@ class ds_pipeline_screen_video(bpy.types.Operator):
465496 bl_region_type = 'WINDOW'
466497 def execute (self , context ):
467498 bpy .context .window .screen = bpy .data .screens ['Video Editing' ]
468- bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_btn = False
499+ bpy .context .user_preferences .addons [__package__ ].preferences .option_show_screens_toggle_state = False
469500 return {'FINISHED' }
470501
471502class ds_pipeline_prefs_open (bpy .types .Operator ):
@@ -481,6 +512,32 @@ def execute(self, context):
481512
482513 return {'FINISHED' }
483514
515+ class ds_new (bpy .types .Operator ):
516+
517+ bl_idname = "ds.new"
518+ bl_label = "New"
519+ bl_space_type = 'PROPERTIES'
520+ bl_region_type = 'WINDOW'
521+
522+ def execute (self , context ):
523+
524+ bpy .ops .wm .read_homefile ()
525+
526+ return {'FINISHED' }
527+
528+ class ds_open (bpy .types .Operator ):
529+
530+ bl_idname = "ds.open"
531+ bl_label = "Open"
532+ bl_space_type = 'PROPERTIES'
533+ bl_region_type = 'WINDOW'
534+
535+ def execute (self , context ):
536+
537+ bpy .ops .wm .open_mainfile ()
538+
539+ return {'FINISHED' }
540+
484541class ds_save (bpy .types .Operator ):
485542
486543 bl_idname = "ds.save"
@@ -513,7 +570,10 @@ def register():
513570
514571 register_class (ds_pipeline_menu_toggle )
515572 register_class (ds_pipeline_screens_toggle )
573+ register_class (ds_pipeline_iclone_toggle )
516574
575+ register_class (ds_new )
576+ register_class (ds_open )
517577 register_class (ds_save )
518578 register_class (ds_save_as )
519579 register_class (ds_pipeline_addon_prefs )
@@ -563,7 +623,10 @@ def unregister():
563623
564624 unregister_class (ds_pipeline_menu_toggle )
565625 unregister_class (ds_pipeline_screens_toggle )
626+ unregister_class (ds_pipeline_iclone_toggle )
566627
628+ unregister_class (ds_new )
629+ unregister_class (ds_open )
567630 unregister_class (ds_save )
568631 unregister_class (ds_save_as )
569632 unregister_class (ds_pipeline_addon_prefs )
0 commit comments