[Bf-extensions-cvs] [fe90ef2b] blender2.8: rigify: update for Blender 2.8
Ines Almeida
noreply at git.blender.org
Fri Aug 10 23:29:38 CEST 2018
Commit: fe90ef2b4bced9cad6e7f33b667931c4fa1af286
Author: Ines Almeida
Date: Fri Aug 10 22:30:02 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBAfe90ef2b4bced9cad6e7f33b667931c4fa1af286
rigify: update for Blender 2.8
===================================================================
M rigify/__init__.py
M rigify/legacy/__init__.py
M rigify/legacy/rigs/basic/copy.py
M rigify/legacy/rigs/basic/copy_chain.py
M rigify/legacy/rigs/pitchipoy/super_copy.py
M rigify/legacy/rigs/pitchipoy/super_face.py
M rigify/legacy/ui.py
M rigify/metarig_menu.py
M rigify/rig_ui_template.py
M rigify/rigs/basic/super_copy.py
M rigify/rot_mode.py
M rigify/ui.py
===================================================================
diff --git a/rigify/__init__.py b/rigify/__init__.py
index fa93533b..afc3071f 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -22,7 +22,7 @@ bl_info = {
"name": "Rigify",
"version": (0, 5),
"author": "Nathan Vegdahl, Lucio Rossi, Ivan Cappiello",
- "blender": (2, 78, 0),
+ "blender": (2, 80, 0),
"description": "Automatic rigging from building-block components",
"location": "Armature properties, Bone properties, View3d tools panel, Armature Add menu",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
@@ -44,7 +44,15 @@ import bpy
import sys
import os
from bpy.types import AddonPreferences
-from bpy.props import BoolProperty
+from bpy.props import (
+ BoolProperty,
+ IntProperty,
+ EnumProperty,
+ StringProperty,
+ FloatVectorProperty,
+ PointerProperty,
+ CollectionProperty,
+)
class RigifyPreferences(AddonPreferences):
@@ -118,14 +126,13 @@ class RigifyPreferences(AddonPreferences):
register()
- legacy_mode = BoolProperty(
+ legacy_mode: BoolProperty(
name='Rigify Legacy Mode',
description='Select if you want to use Rigify in legacy mode',
default=False,
update=update_legacy
)
-
- show_expanded = BoolProperty()
+ show_expanded: BoolProperty()
def draw(self, context):
layout = self.layout
@@ -158,56 +165,56 @@ class RigifyPreferences(AddonPreferences):
class RigifyName(bpy.types.PropertyGroup):
- name = bpy.props.StringProperty()
+ name: StringProperty()
class RigifyColorSet(bpy.types.PropertyGroup):
- name = bpy.props.StringProperty(name="Color Set", default=" ")
- active = bpy.props.FloatVectorProperty(
- name="object_color",
- subtype='COLOR',
- default=(1.0, 1.0, 1.0),
- min=0.0, max=1.0,
- description="color picker"
- )
- normal = bpy.props.FloatVectorProperty(
- name="object_color",
- subtype='COLOR',
- default=(1.0, 1.0, 1.0),
- min=0.0, max=1.0,
- description="color picker"
- )
- select = bpy.props.FloatVectorProperty(
- name="object_color",
- subtype='COLOR',
- default=(1.0, 1.0, 1.0),
- min=0.0, max=1.0,
- description="color picker"
- )
- standard_colors_lock = bpy.props.BoolProperty(default=True)
+ name: StringProperty(name="Color Set", default=" ")
+ active: FloatVectorProperty(
+ name="object_color",
+ subtype='COLOR',
+ default=(1.0, 1.0, 1.0),
+ min=0.0, max=1.0,
+ description="color picker"
+ )
+ normal: FloatVectorProperty(
+ name="object_color",
+ subtype='COLOR',
+ default=(1.0, 1.0, 1.0),
+ min=0.0, max=1.0,
+ description="color picker"
+ )
+ select: FloatVectorProperty(
+ name="object_color",
+ subtype='COLOR',
+ default=(1.0, 1.0, 1.0),
+ min=0.0, max=1.0,
+ description="color picker"
+ )
+ standard_colors_lock: BoolProperty(default=True)
class RigifySelectionColors(bpy.types.PropertyGroup):
- select = bpy.props.FloatVectorProperty(
- name="object_color",
- subtype='COLOR',
- default=(0.314, 0.784, 1.0),
- min=0.0, max=1.0,
- description="color picker"
- )
+ select: FloatVectorProperty(
+ name="object_color",
+ subtype='COLOR',
+ default=(0.314, 0.784, 1.0),
+ min=0.0, max=1.0,
+ description="color picker"
+ )
- active = bpy.props.FloatVectorProperty(
- name="object_color",
- subtype='COLOR',
- default=(0.549, 1.0, 1.0),
- min=0.0, max=1.0,
- description="color picker"
- )
+ active: FloatVectorProperty(
+ name="object_color",
+ subtype='COLOR',
+ default=(0.549, 1.0, 1.0),
+ min=0.0, max=1.0,
+ description="color picker"
+ )
class RigifyParameters(bpy.types.PropertyGroup):
- name = bpy.props.StringProperty()
+ name: StringProperty()
class RigifyArmatureLayer(bpy.types.PropertyGroup):
@@ -225,104 +232,123 @@ class RigifyArmatureLayer(bpy.types.PropertyGroup):
else:
self['group_prop'] = value
- name = bpy.props.StringProperty(name="Layer Name", default=" ")
- row = bpy.props.IntProperty(name="Layer Row", default=1, min=1, max=32, description='UI row for this layer')
- set = bpy.props.BoolProperty(name="Selection Set", default=False, description='Add Selection Set for this layer')
- group = bpy.props.IntProperty(name="Bone Group", default=0, min=0, max=32,
- get=get_group, set=set_group, description='Assign Bone Group to this layer')
+ name: StringProperty(name="Layer Name", default=" ")
+ row: IntProperty(name="Layer Row", default=1, min=1, max=32, description='UI row for this layer')
+ selset: BoolProperty(name="Selection Set", default=False, description='Add Selection Set for this layer')
+ group: IntProperty(name="Bone Group", default=0, min=0, max=32,
+ get=get_group, set=set_group, description='Assign Bone Group to this layer')
+
##### REGISTER #####
+classes = (
+ RigifyName,
+ RigifyParameters,
+ RigifyColorSet,
+ RigifySelectionColors,
+ RigifyArmatureLayer,
+ RigifyPreferences,
+)
+
+
def register():
+ from bpy.utils import register_class
+
+ # Sub-modules.
ui.register()
metarig_menu.register()
- bpy.utils.register_class(RigifyName)
- bpy.utils.register_class(RigifyParameters)
-
- bpy.utils.register_class(RigifyColorSet)
- bpy.utils.register_class(RigifySelectionColors)
- bpy.utils.register_class(RigifyArmatureLayer)
- bpy.utils.register_class(RigifyPreferences)
- bpy.types.Armature.rigify_layers = bpy.props.CollectionProperty(type=RigifyArmatureLayer)
-
- bpy.types.PoseBone.rigify_type = bpy.props.StringProperty(name="Rigify Type", description="Rig type for this bone")
- bpy.types.PoseBone.rigify_parameters = bpy.props.PointerProperty(type=RigifyParameters)
-
- bpy.types.Armature.rigify_colors = bpy.props.CollectionProperty(type=RigifyColorSet)
-
- bpy.types.Armature.rigify_selection_colors = bpy.props.PointerProperty(type=RigifySelectionColors)
-
- bpy.types.Armature.rigify_colors_index = bpy.props.IntProperty(default=-1)
- bpy.types.Armature.rigify_colors_lock = bpy.props.BoolProperty(default=True)
- bpy.types.Armature.rigify_theme_to_add = bpy.props.EnumProperty(items=(('THEME01', 'THEME01', ''),
- ('THEME02', 'THEME02', ''),
- ('THEME03', 'THEME03', ''),
- ('THEME04', 'THEME04', ''),
- ('THEME05', 'THEME05', ''),
- ('THEME06', 'THEME06', ''),
- ('THEME07', 'THEME07', ''),
- ('THEME08', 'THEME08', ''),
- ('THEME09', 'THEME09', ''),
- ('THEME10', 'THEME10', ''),
- ('THEME11', 'THEME11', ''),
- ('THEME12', 'THEME12', ''),
- ('THEME13', 'THEME13', ''),
- ('THEME14', 'THEME14', ''),
- ('THEME15', 'THEME15', ''),
- ('THEME16', 'THEME16', ''),
- ('THEME17', 'THEME17', ''),
- ('THEME18', 'THEME18', ''),
- ('THEME19', 'THEME19', ''),
- ('THEME20', 'THEME20', '')
- ), name='Theme')
+ # Classes.
+ for cls in classes:
+ register_class(cls)
+
+ #Properties.
+ bpy.types.Armature.rigify_layers = CollectionProperty(type=RigifyArmatureLayer)
+
+ bpy.types.PoseBone.rigify_type = StringProperty(name="Rigify Type", description="Rig type for this bone")
+ bpy.types.PoseBone.rigify_parameters = PointerProperty(type=RigifyParameters)
+
+ bpy.types.Armature.rigify_colors = CollectionProperty(type=RigifyColorSet)
+
+ bpy.types.Armature.rigify_selection_colors = PointerProperty(type=RigifySelectionColors)
+
+ bpy.types.Armature.rigify_colors_index = IntProperty(default=-1)
+ bpy.types.Armature.rigify_colors_lock = BoolProperty(default=True)
+ bpy.types.Armatu
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list