Hi Guys,
I just began my work for rigging script and find out that the API for Blender 2.56a is changing alot. And as someone who’s code blind, i’m desperately need some help. So here’s what happen…
I tried to create a script to make all the custom properties in my rig tobe easy to view, well actually i just copy paste the script from another awesome free rig like Buff or Flick, changing here and there as if i understand the flow (maybe a little). But somehow the script is working like a charm. As you can see in my screenshot the properties in the red box is just the way i wanted tobe.
The problem is, when i try to link the rig, open my koboi_group, make proxy and try to run the script, it just doesn’t work anymore. I also tried to open the script as the addons, but it’s not working as well. So i wonder if i make a mistake on the script, can any of you take a look please ? I really need your help.
bl_addon_info = {
"name": "Koboi1 Script",
"author": "Johan Tri Handoyo",
"version": (1),
"blender": (2, 5, 5),
"api": 33588,
"location": "N properties",
"description": "Animator Friendly Controller",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Other"}
import bpy
class Koboi1RigProperties(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_label = "Koboi_1's Properties"
@classmethod
def poll(self, context):
try:
ob = context.active_object
mode = context.mode
return (ob.name == "koboi1" and mode == "POSE")
except AttributeError:
return 0
def draw(self, context):
pose_bones = context.active_object.pose.bones
layout = self.layout
col = layout.column()
col.label(text="FK --------------- IK")
col.prop(pose_bones["world"], '["01_lefthand-FKIK"]', text="lefthand-FKIK", slider=True)
col.prop(pose_bones["world"], '["02_righthand_FKIK"]', text="righthand-FKIK", slider=True)
viscol01 = col.row()
viscol01.prop(pose_bones["world"], '["17_L.Hand2hip"]', text="L.Hand to Hip", toggle=True)
viscol01 = col.row()
viscol01.prop(pose_bones["world"], '["18_R.Hand2hip"]', text="R.Hand to Hip", toggle=True)
col.label(text="Bendy")
col.prop(pose_bones["world"], '["19_R.bendyhand"]', text="R.Bendyhand", slider=True)
col.prop(pose_bones["world"], '["20_L.bendyhand"]', text="L.Bendyhand", slider=True)
col.prop(pose_bones["world"], '["22_R.bendyleg"]', text="R.Bendyleg", slider=True)
col.prop(pose_bones["world"], '["21_L.bendyleg"]', text="L.Bendyleg", slider=True)
col.prop(pose_bones["world"], '["27_R.bendyhand"]', text="R.Bendyfinger", slider=True)
col.prop(pose_bones["world"], '["28_L.bendyhand"]', text="L.Bendyfinger", slider=True)
col.label(text="Phoneme & Facial")
col.prop(pose_bones["world"], '["04_AEDYX"]', text="AEDYX", slider=True)
col.prop(pose_bones["world"], '["05_OUW"]', text="OUW", slider=True)
col.prop(pose_bones["world"], '["06_MBP"]', text="MBP", slider=True)
col.prop(pose_bones["world"], '["07_smile"]', text="smile", slider=True)
col.prop(pose_bones["world"], '["08_sad"]', text="sad", slider=True)
col.prop(pose_bones["world"], '["09_L.upperlip"]', text="L.upperlip", slider=True)
col.prop(pose_bones["world"], '["10_L.lowerlip"]', text="L.lowerlip", slider=True)
col.prop(pose_bones["world"], '["11_R.upperlip"]', text="R.upperlip", slider=True)
col.prop(pose_bones["world"], '["12_R.lowerlip"]', text="R.lowerlip", slider=True)
col.prop(pose_bones["world"], '["23_L.cheek"]', text="L.cheek", slider=True)
col.prop(pose_bones["world"], '["24_R.cheek"]', text="R.cheek", slider=True)
col.prop(pose_bones["world"], '["25_smalllip"]', text="small_lip", slider=True)
col.label(text="Eyes")
col.prop(pose_bones["world"], '["13_L.uppereyelid"]', text="L.upeye", slider=True)
col.prop(pose_bones["world"], '["14_L.lowereyelid"]', text="L.loweye", slider=True)
col.prop(pose_bones["world"], '["15_R.uppereyelid"]', text="R.upeye", slider=True)
col.prop(pose_bones["world"], '["16_R.lowereyelid"]', text="R.loweye", slider=True)
col.label(text="Controler Visibility")
viscol01 = col.row()
viscol01.prop(context.active_object.data, "layers", index=0, toggle=True, text="Base")
viscol01.prop(context.active_object.data, "layers", index=1, toggle=True, text="Face")
viscol01 = col.row()
viscol01.prop(context.active_object.data, "layers", index=2, toggle=True, text="IK-Hand")
viscol01.prop(context.active_object.data, "layers", index=3, toggle=True, text="FK-Hand")
viscol01 = col.row()
viscol01.prop(context.active_object.data, "layers", index=4, toggle=True, text="Tongue")
viscol01.prop(context.active_object.data, "layers", index=5, toggle=True, text="Teeth")
viscol01 = col.row()
viscol01.prop(context.active_object.data, "layers", index=8, toggle=True, text="lips & cheek")
viscol01.prop(context.active_object.data, "layers", index=9, toggle=True, text="Wardrobe")
col.label(text="Scene Visibility")
viscol01 = col.row()
viscol01.prop(context.scene.render, "use_simplify", slider=True, text="Simplify")
viscol01.prop(context.scene.render, "simplify_subdivision", slider=True, text="subdiv")
viscol01 = col.row()
viscol01.prop(context.active_object, "show_x_ray", toggle=True, text="X-Ray Bones")
def register():
pass
def unregister():
pass
if __name__ == "__main__":
register()
Here’s the .blend file if you want to check http://dl.dropbox.com/u/13769882/koboi1.blend.zip
Thank you in advance,