22
22
"name" : "Rigify" ,
23
23
"version" : (0 , 5 ),
24
24
"author" : "Nathan Vegdahl, Lucio Rossi, Ivan Cappiello" ,
25
- "blender" : (2 , 78 , 0 ),
25
+ "blender" : (2 , 79 , 0 ),
26
26
"description" : "Automatic rigging from building-block components" ,
27
27
"location" : "Armature properties, Bone properties, View3d tools panel, Armature Add menu" ,
28
28
"wiki_url" : "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
46
46
from bpy .types import AddonPreferences
47
47
from bpy .props import BoolProperty
48
48
from bpy .props import StringProperty
49
+ from bpy .props import PointerProperty
49
50
50
51
51
52
class RigifyPreferences (AddonPreferences ):
@@ -331,6 +332,39 @@ def register():
331
332
('THEME20' , 'THEME20' , '' )
332
333
), name = 'Theme' )
333
334
335
+ bpy .types .Armature .rigify_advanced_generation = bpy .props .BoolProperty (name = "Advanced Options" ,
336
+ description = "Enables/disables advanced options for Rigify rig generation" ,
337
+ default = False )
338
+
339
+ def update_mode (self , context ):
340
+ if self .rigify_generate_mode == 'new' :
341
+ self .rigify_force_widget_update = False
342
+
343
+ bpy .types .Armature .rigify_generate_mode = bpy .props .EnumProperty (name = "Rigify Generate Rig Mode" ,
344
+ description = "'Generate Rig' mode. In 'overwrite' mode the features of the target rig will be updated as defined by the metarig. In 'new' mode a new rig will be created as defined by the metarig. Current mode" ,
345
+ update = update_mode ,
346
+ items = (('overwrite' , 'overwrite' , '' ),
347
+ ('new' , 'new' , '' )))
348
+
349
+ bpy .types .Armature .rigify_force_widget_update = bpy .props .BoolProperty (name = "Force Widget Update" ,
350
+ description = "Forces Rigify to delete and rebuild all the rig widgets. if unset, only missing widgets will be created" ,
351
+ default = False )
352
+
353
+ # bpy.types.Armature.rigify_target_rigs = bpy.props.CollectionProperty(type=RigifyName)
354
+ bpy .types .Armature .rigify_target_rig = PointerProperty (type = bpy .types .Object ,
355
+ name = "Rigify Target Rig" ,
356
+ description = "Defines which rig to overwrite. If unset, a new one called 'rig' will be created." ,
357
+ poll = lambda self , obj : obj .type == 'ARMATURE' )
358
+
359
+ # bpy.types.Armature.rigify_rig_uis = bpy.props.CollectionProperty(type=RigifyName)
360
+ bpy .types .Armature .rigify_rig_ui = PointerProperty (type = bpy .types .Text ,
361
+ name = "Rigify Target Rig UI" ,
362
+ description = "Defines the UI to overwrite. It should always be the same as the target rig. If unset, 'rig_ui.py' will be used" )
363
+
364
+ bpy .types .Armature .rigify_rig_basename = bpy .props .StringProperty (name = "Rigify Rig Name" ,
365
+ description = "Defines the name of the Rig. If unset, in 'new' mode 'rig' will be used, in 'overwrite' mode the target rig name will be used" ,
366
+ default = "" )
367
+
334
368
IDStore = bpy .types .WindowManager
335
369
IDStore .rigify_collection = bpy .props .EnumProperty (items = rig_lists .col_enum_list , default = "All" ,
336
370
name = "Rigify Active Collection" ,
@@ -339,38 +373,6 @@ def register():
339
373
IDStore .rigify_types = bpy .props .CollectionProperty (type = RigifyName )
340
374
IDStore .rigify_active_type = bpy .props .IntProperty (name = "Rigify Active Type" , description = "The selected rig type" )
341
375
342
- IDStore .rigify_advanced_generation = bpy .props .BoolProperty (name = "Advanced Options" ,
343
- description = "Enables/disables advanced options for Rigify rig generation" ,
344
- default = False )
345
-
346
- def update_mode (self , context ):
347
- if self .rigify_generate_mode == 'new' :
348
- self .rigify_force_widget_update = False
349
-
350
- IDStore .rigify_generate_mode = bpy .props .EnumProperty (name = "Rigify Generate Rig Mode" ,
351
- description = "'Generate Rig' mode. In 'overwrite' mode the features of the target rig will be updated as defined by the metarig. In 'new' mode a new rig will be created as defined by the metarig. Current mode" ,
352
- update = update_mode ,
353
- items = (('overwrite' , 'overwrite' , '' ),
354
- ('new' , 'new' , '' )))
355
-
356
- IDStore .rigify_force_widget_update = bpy .props .BoolProperty (name = "Force Widget Update" ,
357
- description = "Forces Rigify to delete and rebuild all the rig widgets. if unset, only missing widgets will be created" ,
358
- default = False )
359
-
360
- IDStore .rigify_target_rigs = bpy .props .CollectionProperty (type = RigifyName )
361
- IDStore .rigify_target_rig = bpy .props .StringProperty (name = "Rigify Target Rig" ,
362
- description = "Defines which rig to overwrite. If unset, a new one called 'rig' will be created." ,
363
- default = "" )
364
-
365
- IDStore .rigify_rig_uis = bpy .props .CollectionProperty (type = RigifyName )
366
- IDStore .rigify_rig_ui = bpy .props .StringProperty (name = "Rigify Target Rig UI" ,
367
- description = "Defines the UI to overwrite. It should always be the same as the target rig. If unset, 'rig_ui.py' will be used" ,
368
- default = "" )
369
-
370
- IDStore .rigify_rig_basename = bpy .props .StringProperty (name = "Rigify Rig Name" ,
371
- description = "Defines the name of the Rig. If unset, in 'new' mode 'rig' will be used, in 'overwrite' mode the target rig name will be used" ,
372
- default = "" )
373
-
374
376
IDStore .rigify_transfer_only_selected = bpy .props .BoolProperty (name = "Transfer Only Selected" , description = "Transfer selected bones only" , default = True )
375
377
IDStore .rigify_transfer_start_frame = bpy .props .IntProperty (name = "Start Frame" , description = "First Frame to Transfer" , default = 0 , min = 0 )
376
378
IDStore .rigify_transfer_end_frame = bpy .props .IntProperty (name = "End Frame" , description = "Last Frame to Transfer" , default = 0 , min = 0 )
0 commit comments