0
$\begingroup$

I am creating a rig/skeleton/bones in Blender python, using bpy, here: https://github.com/coderextreme/X3DJSONLD/blob/master/blend/blenderskeleton.py

I was looking at the code and in Blender and I realized that skeleton = bpy.data.objects.new("Armature", bpy.data.armatures.new("Armature")) looked a little misguided. Does someone have a better suggestion how to add an armature?

$\endgroup$
2
  • $\begingroup$ I see that after running your line, an armature appears in the outliner, but not the scene. Try "bpy.ops.object.armature_add()" and then follow it with "skeleton = bpy.context.object" If the default armature isn't what you need, you may want to explore the python console and type into it"bpy.ops.object.armature_" and then press "Tab" to see the other options (basic human metarig, bird metarig, etc...) $\endgroup$ Commented Sep 29, 2023 at 18:09
  • $\begingroup$ I am using the standard HAnimJoints to define my “bones.” I’ve changed the code a bit if you want to review it. $\endgroup$ Commented Dec 15, 2023 at 23:11

0

You must log in to answer this question.

Browse other questions tagged .