Python GUI & Rigging, how much can be done?

Before i even start digging into blender, i need to know how much can be done with python and rigging. Can anything you do in the interface, rigging wise, be done in python?

And how is the GUI interface built from python, i don’t need advanced GUI features, but having a python script build a dynamic GUI (mostly dynamic content within things such as dropdown lists, etc) needs to be possible.

I plan on converting my XSI Riggin Plugin(s) to a blender one, and making it opensource etc. But for me to even consider using blender, i have to have these :).

Its sort of hard for me to gauge what is possible in blender with python, so i’m hoping just to get a quick “yes its easily possible”, or “no its not”, etc. And ofcourse any links to good resources would be very handy.

Thank You,
Lee O

I would wager you can do about 75-80% of what you want via Python, depending on exactly what features you need (. In some cases you’re going to be able to do 100% of what you want, in others, you may only be able to pull off <30%.

And how is the GUI interface built from python, i don’t need advanced GUI features, but having a python script build a dynamic GUI (mostly dynamic content within things such as dropdown lists, etc) needs to be possible.
BGL and Draw Modules (expose OpenGL and Blender internal drawing methods (buttons, text, menus, etc.) respectively).

Its sort of hard for me to gauge what is possible in blender with python, so i’m hoping just to get a quick “yes its easily possible”, or “no its not”, etc. And ofcourse any links to good resources would be very handy.

API: http://www.blender.org/documentation/246PythonDoc/

Hmm, well this may be the biggest problem for me. I am a rigger who does 95% of rigging through automatic programming. (I find it the only sane way heh). Basically, anything that cannot be done via python for rigging, i wont have access to… which makes me wonder if i can even use blender currently. Though its hard to gauge what i need and what i don’t, considering i don’t know what is not in the api (even if i read through it, it wouldn’t make sense to me until 3 weeks down the road when i know blender and hit a wall).

I am devoid of Python but you might be interested in taking a look at [url=http://www.malefico3d.org/blog-en/?p=22]malefico 's spot./url]

He uses a Pyscript to switch between FK/IK through a drop-down menu.

You might want to look at the scripts that have already been written and incorporated into Blender. Change a window to a scripts window (the icon in the lower left corner) and then simply open scripts and see what kind of tools and GUIs others have built. If they can do it, it’s possible.

For example: in Scripts>>Animation>>Shape Widget Wizard there is a GUI with a drop down list. I have no idea whether it’s a dynamic GUI, but then, I don’t know what that means. :smiley:

Plus, if you find what you need, you’ll have a model for coding it in the PY file for the script.

I’m more concerned about rigging, not much is needed in terms of GUI for me… but rigging is the most important.

Blender provides a python API where you can create a brand new armature, rig it by establishing contstraints, and animate it completely. See the BVH import/export script for an example of that. I am working on a similar script for C3D files.

there is one thing i still did not find:
how to store different settings of a script-usage?

something like you have a script with little gui to setup some variables
and the only way i found was to create an object with a special name
(dont laugh), i used a text-object and put the vars into the text-field
like 1=3.2:2=270:3=armature4:4=body… and so on
and on script-start i check for this special variable name and if found, use the entries of the textfield

and the pydrivers are always dying after changes of some used ipo-entries of objects…

You can set properties in the “logic” buttons panel. Here you can store strings, booleans, integers and floats.

They can be added, set, modified and removed with python through bpy.data.objects.getProperty(name)

…etc etc check the bpy object docs here
http://www.blender.org/documentation/246PythonDoc/Object.Object-class.html

You can make a gui panel for settings you want the user to make, and the write those out to a log file to record what the script used.
you can read in settings from a file for changes/direction the user wants.
you can use the rt: button or read any property inside a blender scene.