Is there any place where I can create custom properties to an armature and make them show up in the properties panel in the 3D view when I am in pose mode? Having the custom properties and the posing of bones in the same place is very convinient when working.
When I add custom properties to the object, they only show up in object mode, if I add them to the armature they don’t show up at all, and if I add them to a certain bone, they only show up when that bone is selected.
Ideally I think the armature custom properties should show up in pose mode, but perhaps there is a reason it doesn’t?
I know you can add custom panels in python, but I don’t really think you should have to use python for something so simple Custom properties is such a normal part of rigging and posing.
All custom properties are available from their appropriate properties panel.
Custom props on the armature (ArmObj.data) will be on the data properties panel
on the armature object will be in the object properties panel
those on the bones will be on the bones property panel etc
The 3D view properties panel has convenience panels based on your selection and mode.
Ultimately Gustav your best bet is to learn some very basic python scripting to make your own panel
Here is a start, it’s from the basic UI panel template available under the templates menu in the script editor. Paste the below code into a new text window, right click and run script. There will now be a panel on the properties bar of the 3D view. You need to have a custom property named prop on the armature object, armature, and each bone to show the properties… Change these to suit your needs. If you have any issues post them in the python support forum and someone will give you a hand.
import bpy
class HelloWorldPanel(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "Hello World Panel"
bl_idname = "OBJECT_PT_hello"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_context = "object"
@classmethod
def poll(cls, context):
return context.object.type == 'ARMATURE'
def draw(self, context):
layout = self.layout
armobj = context.object # armature object
arm = armobj.data # armature
row = layout.row()
row.prop(armobj, '["prop"]') # custom property named prop on armature object
row = layout.row()
row.prop(arm, '["prop"]') # custom property named prop on armature
active_pose_bone = context.active_pose_bone
# if there is an active pose bone then show the prop property on that bone.
if active_pose_bone is not None:
row = layout.row()
row.prop(active_pose_bone, '["prop"]')
def register():
bpy.utils.register_class(HelloWorldPanel)
def unregister():
bpy.utils.unregister_class(HelloWorldPanel)
if __name__ == "__main__":
register()
Thank you for you answer, batFINGER Very nice of you to include a code sample.
The problem is (and I suppose I should have mentioned it in my original post) is that I am working on a tutorial where I use custom properties to control some aspects of a rig, and I had hoped there would be a way to make them easily accessbile without having to bring in python (since python is not the focus of the tutorial).
But I suppose I will just have to stick to my original plan of having the “Properties view -> Object” open to the side. It is not really that much of an issue, but when you are doing a tutorial you want to make sure you don’t teach the wrong thing by missing a better method