So I was following a tutorial for creating FK/IK rigs. Things are going along fine. But I got to a coding part. I’m doing that, but whenever it says to run the script to make sure things are working, they’re not. And then I ran into an error that has me confused. I’ve done everything 100% like in the video (Except for the few things I’ve changed to match what’s in my file)
This is the tutorial: http://www.blendercookie.com/2011/02/07/creating_fk_ik_rig/
I’ve gotten to about 39:08 on it.
This is the coding I have so far with it.
import bpy
class showButtons(bpy.types.Panel):
bl_label = "Rig Layers"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
@classmethod
def poll(self, context):
if(bpy.context.active_object.type == 'ARMATURE':)
return(True)
def draw(self, context):
layout = self.layout
row = layout.row()
row.label("ArmL:")
row.prop(context.active_object.data, "layers", index=1, toggle=True, text="FK")
row.prop(context.active_object.data, "layers", index=2, toggle=True, text="IK")
class showButtons(bpy.types.Panel):
bl_label = "IK Slider"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
@classmethod
def poll(self, context):
if(bpy.context.active_object.type == 'ARMATURE':)
return(True)
def draw(self, context):
layout = self.layout
row = layout.row()
row.label("LegIK.L:")
row.prop(context.active_object.data, "['LegIK.L']", index=1, toggle=True, text="FK")
The error I get is at line ten “if(bpy.context.active_object.type == ‘ARMATURE’”
It tells me that it’s invalid syntax.
The rest of it not working I don’t know what the problem is. Do I have something spelled wrong somewhere that I’ve simply missed? Or is the tutorial out of date (which would be odd as it’s in version 2.5 as well…) or am I perhaps out of date?