has any one figured out the sintel_rig_props.py issue?

(Edit) I have solved the below problem by linking the updated .py script from Ben Danse’s Sintel Lite for 2.7b.

i’ve just started to animate sintel and the sintel_rig_props.py script that you need to link in in order to control her doesnt work. at least not with 2.58a. i get an error message that highlights ‘bpy.types.register (RigUI)’.

I’ve tried it in the renderbranch that came with the disks and it works fine…only that that release is soooooo buggy that it crashes when i try and import sounds etc (which i need to do). so my only option is to use the stable 2.58a.

any solutions would be much apreciated

The same error occurs in the adult dragon file. The following code fixes the problem:

import bpy
import re

id_prefix = “DRAGON”
rig_name = “dragon_rig”

fk_arm_l = [“upper_arm.L”, “forearm.L”, “hand.L”]
fk_arm_r = [“upper_arm.R”, “forearm.R”, “hand.R”]
fk_leg_l = [“thigh.L”, “shin.L”, “foot.L”]
fk_leg_r = [“thigh.R”, “shin.R”, “foot.R”]

ik_arm_l = [“hand_ik.L”, “elbow_target.L”]
ik_arm_r = [“hand_ik.R”, “elbow_target.R”]
ik_leg_l = [“foot_ik.L”, “knee_target.L”, “foot_roll.L”]
ik_leg_r = [“foot_ik.R”, “knee_target.R”, “foot_roll.R”]

fk_spine = [“rib_cage”, “spine.01”, “spine.02”, “spine.03”, “spine.04”]
fk_neck = [“neck”, “neck.01”, “neck.02”, “neck.03”]
fk_head = [“head”, “neck.01”, “neck.02”, “neck.03”]

hand_l = [“finger_pinky.L”, “finger_ring.L”, “finger_middle.L”, “finger_index.L”, “thumb.L”, “palm.L”]
hand_r = [“finger_pinky.R”, “finger_ring.R”, “finger_middle.R”, “finger_index.R”, “thumb.R”, “palm.R”]

toe_l = [“toe.L”]
toe_r = [“toe.R”]

tail = [“tail_ik.01”, “tail_ik.02”, “tail_ik.03”, “tail_ik.04”]

class RigUI(bpy.types.Panel):
bl_space_type = ‘VIEW_3D’
bl_region_type = ‘UI’
bl_label = “Rig Main Properties”
bl_idname = id_prefix + “_PT_rig_ui”

@classmethod
def poll(self, context):
    if context.mode != 'POSE':
        return False
    try:
        return (context.active_object.data["rig_name"] == rig_name)
    except (AttributeError, KeyError, TypeError):
        return False

def draw(self, context):
    layout = self.layout        
    pose_bones = context.active_object.pose.bones
    try:
        selected_bones = [bone.name for bone in context.selected_pose_bones]
        selected_bones += [context.active_pose_bone.name]
    except (AttributeError, TypeError):
        return
    
    def is_selected(names):
        """ Returns whether any of the named bones are selected.
        """
        for name in names:
            if name in selected_bones:
                return True
        return False
      

    # IK
    if is_selected(fk_arm_l + ik_arm_l):
        layout.prop(pose_bones["hand_ik.L"], '["ik"]', text="IK (arm.L)", slider=True)
    if is_selected(fk_arm_r + ik_arm_r):
        layout.prop(pose_bones["hand_ik.R"], '["ik"]', text="IK (arm.R)", slider=True)
    if is_selected(fk_leg_l + ik_leg_l + toe_l):
        layout.prop(pose_bones["foot_ik.L"], '["ik"]', text="IK (leg.L)", slider=True)
    if is_selected(fk_leg_r + ik_leg_r + toe_r):
        layout.prop(pose_bones["foot_ik.R"], '["ik"]', text="IK (leg.R)", slider=True)

    # Hinge        
    if is_selected(fk_arm_l):
        layout.prop(pose_bones["upper_arm.L"], '["hinge"]', text="Hinge (arm.L)", slider=True)
    if is_selected(fk_arm_r):
        layout.prop(pose_bones["upper_arm.R"], '["hinge"]', text="Hinge (arm.R)", slider=True)
    if is_selected(fk_leg_l):
        layout.prop(pose_bones["thigh.L"], '["hinge"]', text="Hinge (leg.L)", slider=True)
    if is_selected(fk_leg_r):
        layout.prop(pose_bones["thigh.R"], '["hinge"]', text="Hinge (leg.R)", slider=True)
    if is_selected(fk_head):
        layout.prop(pose_bones["head"], '["hinge"]', text="Hinge (head)", slider=True)
    if is_selected(fk_neck):
        layout.prop(pose_bones["neck"], '["hinge"]', text="Hinge (neck)", slider=True)
    if is_selected(fk_spine + ["pelvis"]):
        layout.prop(pose_bones["rib_cage"], '["hinge"]', text="Hinge (torso)", slider=True)

    # Wings hinge
    try:
        for bone in context.selected_pose_bones:
            if "wing" in bone.name:
                try:
                    bone["hinge"]
                except KeyError:
                    pass
                else:
                    layout.prop(bone, '["hinge"]', text="Hinge (" + bone.name + ")", slider=True)
    except TypeError:
        pass


    # Hands
    if is_selected(hand_l):
        layout.prop(pose_bones["palm.L"], '["spread"]', text="Spread (palm.L)", slider=True)
    if is_selected(hand_r):
        layout.prop(pose_bones["palm.R"], '["spread"]', text="Spread (palm.R)", slider=True)

    
    # Body
    if is_selected(fk_spine + ["hips"]):
        layout.prop(pose_bones["rib_cage"], '["pivot_slide"]', text="Pivot Slide (torso)", slider=True)

    
    # Eyes
    if is_selected(["eye_target"]):
        layout.prop(pose_bones["eye_target"], '["free"]', text="Free (eye_target)", slider=True)
        layout.prop(pose_bones["eye_target"], '["pupil_dilate"]', text="Pupil Dilate (eye_target)", slider=True)        
    
    # Brow
    if is_selected(["brow.R"]):
        layout.prop(pose_bones["brow.R"], '["mad"]', text="Mad (brow.R)", slider=True)
    if is_selected(["brow.L"]):
        layout.prop(pose_bones["brow.L"], '["mad"]', text="Mad (brow.L)", slider=True)
    if is_selected(["brow.R"]):
        layout.prop(pose_bones["brow.R"], '["sad"]', text="Sad (brow.R)", slider=True)
    if is_selected(["brow.L"]):
        layout.prop(pose_bones["brow.L"], '["sad"]', text="Sad (brow.L)", slider=True)
    if is_selected(["brow.R"]):
        layout.prop(pose_bones["brow.R"], '["surp"]', text="Surprise (brow.R)", slider=True)
    if is_selected(["brow.L"]):
        layout.prop(pose_bones["brow.L"], '["surp"]', text="Surprise (brow.L)", slider=True)
    
    # Nose
    if is_selected(["nose.R"]):
        layout.prop(pose_bones["nose.R"], '["flare"]', text="Flare (nose.R)", slider=True)
    if is_selected(["nose.L"]):
        layout.prop(pose_bones["nose.L"], '["flare"]', text="Flare (nose.L)", slider=True)
    if is_selected(["nose.R"]):
        layout.prop(pose_bones["nose.R"], '["sneer"]', text="Sneer (nose.R)", slider=True)
    if is_selected(["nose.L"]):
        layout.prop(pose_bones["nose.L"], '["sneer"]', text="Sneer (nose.L)", slider=True)

    
    # Mouth
    if is_selected(["mouth.R"]):
        layout.prop(pose_bones["mouth.R"], '["up_dn"]', text="Up/Down (mouth.R)", slider=True)
    if is_selected(["mouth.L"]):
        layout.prop(pose_bones["mouth.L"], '["up_dn"]', text="Up/Down (mouth.L)", slider=True)
    if is_selected(["mouth.R"]):
        layout.prop(pose_bones["mouth.R"], '["in_bk"]', text="In/Out (mouth.R)", slider=True)
    if is_selected(["mouth.L"]):
        layout.prop(pose_bones["mouth.L"], '["in_bk"]', text="In/Out (mouth.L)", slider=True)


    # Tail
    if is_selected(tail):
        layout.prop(pose_bones["tail_ik.01"], '["hinge"]', text="Hinge (tail)", slider=True)
        layout.prop(pose_bones["tail_ik.01"], '["free"]', text="Free (tail)", slider=True)
    try:
        for bone in context.selected_pose_bones:
            if "tail" in bone.name:
                layout.prop(pose_bones["tail.01"], '["ik"]', text="IK (tail)", slider=True)
    except TypeError:
        pass

    


    ## Root
    #if is_selected(context, ["root"]):
    #    layout.prop(pose_bones["root"], '["vis_head"]', text="Head Visibility")
    #    layout.prop(pose_bones["root"], '["vis_arm_l"]', text="Arm.L Visibility")
    #    layout.prop(pose_bones["root"], '["vis_arm_r"]', text="Arm.R Visibility")
    #    layout.prop(pose_bones["root"], '["vis_leg_l"]', text="Leg.L Visibility")
    #    layout.prop(pose_bones["root"], '["vis_leg_r"]', text="Leg.R Visibility")

class RigUIExtra(bpy.types.Panel):
bl_space_type = ‘VIEW_3D’
bl_region_type = ‘UI’
bl_label = “Rig Extra Properties”
bl_idname = id_prefix + “_PT_rig_ui_extra”

##############

CONTINUED

#############

@classmethod
def poll(self, context):
    if context.mode != 'POSE':
        return False
    try:
        return (context.active_object.data["rig_name"] == rig_name)
    except (AttributeError, KeyError, TypeError):
        return False

def draw(self, context):
    layout = self.layout        
    pose_bones = context.active_object.pose.bones
    try:
        selected_bones = [bone.name for bone in context.selected_pose_bones]
        selected_bones += [context.active_pose_bone.name]
    except (AttributeError, TypeError):
        return

    def is_selected(names):
        """ Returns whether any of the named bones are selected.
        """
        for name in names:
            if name in selected_bones:
                return True
        return False

    # Head
    if is_selected(fk_head):
        layout.prop(pose_bones["head"], '["extent"]', text="Extent (head)", slider=True)


    # Fingers, Thumbs, Wings
    try:
        for bone in context.selected_pose_bones:
            if "finger" in bone.name != None or "thumb" in bone.name or "wing" in bone.name:
                try:
                    bone["bend_ratio"]
                except KeyError:
                    pass
                else:
                    layout.prop(bone, '["bend_ratio"]', text="Bend Ratio (" + bone.name + ")", slider=True)
    except TypeError:
        pass

    
    if is_selected(["rib_cage", "hips", "spine.05"]):
        layout.prop(pose_bones["rib_cage"], '["bend_04"]', text="Bend 4 (torso)", slider=True)
    if is_selected(["rib_cage", "hips", "spine.04"]):
        layout.prop(pose_bones["rib_cage"], '["bend_03"]', text="Bend 3 (torso)", slider=True)
    if is_selected(["rib_cage", "hips", "spine.03"]):
        layout.prop(pose_bones["rib_cage"], '["bend_02"]', text="Bend 2 (torso)", slider=True)
    if is_selected(["rib_cage", "hips", "spine.02"]):
        layout.prop(pose_bones["rib_cage"], '["bend_01"]', text="Bend 1 (torso)", slider=True)

class RigLayers(bpy.types.Panel):
bl_space_type = ‘VIEW_3D’
bl_region_type = ‘UI’
bl_label = “Rig Layers”
bl_idname = id_prefix + “_PT_rig_layers”

@classmethod
def poll(self, context):
    try:
        return (context.active_object.data["rig_name"] == rig_name)
    except (AttributeError, KeyError, TypeError):
        return False

def draw(self, context):
    layout = self.layout
    col = layout.column()

    # Layers
    body = col.row()
    body.label(text="Body:")
    body.prop(context.active_object.data, "layer", index=0, toggle=True, text="Main")
    body.prop(context.active_object.data, "layer", index=1, toggle=True, text="Extra")

    head = col.row()
    head.label(text="Head:")
    head.prop(context.active_object.data, "layer", index=2, toggle=True, text="Main")
    head.prop(context.active_object.data, "layer", index=3, toggle=True, text="Extra")

    face = col.row()
    face.label(text="Face:")
    face.prop(context.active_object.data, "layer", index=18, toggle=True, text="Main")
    face.prop(context.active_object.data, "layer", index=19, toggle=True, text="Extra")

    hands = col.row()
    hands.label(text="Hands:")
    hands.prop(context.active_object.data, "layer", index=4, toggle=True, text="Main")
    hands.prop(context.active_object.data, "layer", index=5, toggle=True, text="Extra")

    wings = col.row()
    wings.label(text="Wings:")
    wings.prop(context.active_object.data, "layer", index=10, toggle=True, text="Main")
    wings.prop(context.active_object.data, "layer", index=11, toggle=True, text="Extra")

    arm_l = col.row()
    arm_l.label(text="Arm.L:")
    arm_l.prop(context.active_object.data, "layer", index=6, toggle=True, text="FK")
    arm_l.prop(context.active_object.data, "layer", index=7, toggle=True, text="IK")
    
    arm_r = col.row()
    arm_r.label(text="Arm.R:")
    arm_r.prop(context.active_object.data, "layer", index=8, toggle=True, text="FK")
    arm_r.prop(context.active_object.data, "layer", index=9, toggle=True, text="IK")        

    leg_l = col.row()
    leg_l.label(text="Leg.L:")
    leg_l.prop(context.active_object.data, "layer", index=12, toggle=True, text="FK")
    leg_l.prop(context.active_object.data, "layer", index=13, toggle=True, text="IK")

    leg_r = col.row()
    leg_r.label(text="Leg.R:")
    leg_r.prop(context.active_object.data, "layer", index=14, toggle=True, text="FK")
    leg_r.prop(context.active_object.data, "layer", index=15, toggle=True, text="IK")

    tail = col.row()
    tail.label(text="Tail:")
    tail.prop(context.active_object.data, "layer", index=17, toggle=True, text="FK")
    tail.prop(context.active_object.data, "layer", index=16, toggle=True, text="IK")

bpy.utils.register_class(RigUI)
bpy.utils.register_class(RigUIExtra)
bpy.utils.register_class(RigLayers)

#bpy.types.register(RigUI)
#bpy.types.register(RigUIExtra)
#bpy.types.register(RigLayers)

Thank you. That solves the problem of getting the rigify control panel for Sintel. The python script for the dragon does not work, though. I get an error message indicating that lines need to be indented. When you copy the script into a forum message, all of the indentations of lines have been lost. Can you please upload the .py files for Sintel and for the dragon to www.blendswap.com ?

(To clarify for other people: The script needs to be opened and then “Run Script” selected in the Blender text editor. Do a google search for Blender appending and linking if you don’t know how to import a python script from an external .blend file. (File, Append or File, Link is the first step.))

Scales (with script) is on Blendswap

Thank you. :slight_smile:

  1. Is there a .blend file with a python script that works for the baby dragon also please?
  2. Why don’t the python scripts work which are in the .blend files on the Sintel DVD? Will these files work okay with an earlier version of Blender, and if so which version?

Ithink they changed a few of the API interface functions – namely armature.layer to armature.layers. THere was something else too – compare the files on the DVD with the new ones; its pretty obvious.

Older versions of Blender can be downloaded here: http://download.blender.org/release/ I tried Blender versions 2.55, 2.56, 2.56a and 2.57. None of them gave me a rigify control panel with Sintel DVD .blend files, so as far as I can tell there is no version of Blender which works with the Sintel DVD files!! :frowning: I installed rigify in Blender 2.56, 2.56a and 2.57 (in user preferences, add-ons). There is no rigify add-on included with 2.55 so I was not able to install rigify in 2.55.

I would imagine the baby dragon is the same as the adult dragon – just change the top lines to reflect the name of the armature as an object and as an armature (ie I renamed the armature from “rig” to “SCALES” I think – so change it back)

Let me restate… I took the dragon from Sintel DVD, simplified it, renamed the rig and changed the rig_ui script similar to how Ben Dansie did it for Sintel.

To get the script to work on the baby you will need to modify the dragon script to reflect the name you give the baby dragon’s rig

The Sintel-compatible version of Blender (from the Sintel DVD) can also be downloaded from http://graphicall.org :

Render Branch Win32 as in Sintel DVD
http://graphicall.org/396

Render Branch Win64, as in Sintel DVD
http://graphicall.org/397

Render Branch Linux32, As In Sintel DVD
http://graphicall.org/398

Render Branch Linux64, As In Sintel DVD
http://graphicall.org/399