Let's say I want to create a new bone constraint in a script. Blender then tells me that it wants to know which type of constraint I want to create.

Can I print a list of all possible types? I know I could reverse engineer the names by creating the constraints and reading the types, but I'd like to have a more general solution.

So, is there something like print(dir()) that does the job?


2 Answers 2


To answer your question, you can print a list like this:


But in this case I'd suggest to use Blenders documentation.

Note that this is Blender specific, Python doesn't provide a way to list possible valid values for an attribute.


If all you need is an enumeration of available constraints, it's listed in bpy.types.Constraint API documentation.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .