forked from bartvdbraak/blender
Moved the object and bone name fields out of the Transform panel in 3Dview properties. They're in a new panel now called 'Item'. Needs an update in the B.blend to put it on the top.
This commit is contained in:
parent
82baca3f36
commit
93b2ed3822
@ -1338,6 +1338,33 @@ class VIEW3D_PT_3dview_properties(bpy.types.Panel):
|
||||
|
||||
layout.column().itemR(scene, "cursor_location", text="3D Cursor:")
|
||||
|
||||
class VIEW3D_PT_3dview_item(bpy.types.Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'UI'
|
||||
bl_label = "Item"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.active_object or context.bone or context.edit_bone)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
ob = context.object
|
||||
|
||||
row = layout.row()
|
||||
row.itemL(text="", icon='ICON_OBJECT_DATA')
|
||||
row.itemR(ob, "name", text="")
|
||||
|
||||
if ((context.active_bone or context.active_pchan) and ob.type == 'ARMATURE' and (ob.mode == 'EDIT' or ob.mode == 'POSE')):
|
||||
bone = context.active_bone
|
||||
if not bone:
|
||||
pchan = context.active_pchan
|
||||
if pchan:
|
||||
bone = pchan.bone
|
||||
|
||||
row = layout.row()
|
||||
row.itemL(text="", icon='ICON_BONE_DATA')
|
||||
row.itemR(bone, "name", text="")
|
||||
|
||||
class VIEW3D_PT_3dview_display(bpy.types.Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
@ -1664,7 +1691,8 @@ bpy.types.register(VIEW3D_MT_edit_armature)
|
||||
bpy.types.register(VIEW3D_MT_edit_armature_parent)
|
||||
bpy.types.register(VIEW3D_MT_edit_armature_roll)
|
||||
|
||||
bpy.types.register(VIEW3D_PT_3dview_properties) # Panels
|
||||
bpy.types.register(VIEW3D_PT_3dview_item) # Panels
|
||||
bpy.types.register(VIEW3D_PT_3dview_properties)
|
||||
bpy.types.register(VIEW3D_PT_3dview_display)
|
||||
bpy.types.register(VIEW3D_PT_3dview_meshdisplay)
|
||||
bpy.types.register(VIEW3D_PT_3dview_curvedisplay)
|
||||
|
@ -590,18 +590,10 @@ static void v3d_posearmature_buts(uiLayout *layout, View3D *v3d, Object *ob, flo
|
||||
if(bone && (bone->flag & BONE_ACTIVE) && (bone->layer & arm->layer))
|
||||
break;
|
||||
}
|
||||
if (!pchan) {
|
||||
row= uiLayoutRow(layout, 0);
|
||||
uiItemL(row, "No Active Bone", 0);
|
||||
return;
|
||||
}
|
||||
row= uiLayoutRow(layout, 0);
|
||||
// row= uiLayoutRow(layout, 0);
|
||||
|
||||
RNA_pointer_create(&ob->id, &RNA_PoseChannel, pchan, &pchanptr);
|
||||
|
||||
uiItemL(row, "", ICON_BONE_DATA);
|
||||
uiItemR(row, "", 0, &pchanptr, "name", 0);
|
||||
|
||||
col= uiLayoutColumn(layout, 0);
|
||||
|
||||
/* XXX: RNA buts show data in native types (i.e. quats, 4-component axis/angle, etc.)
|
||||
@ -702,10 +694,9 @@ static void v3d_editarmature_buts(uiLayout *layout, View3D *v3d, Object *ob, flo
|
||||
if (!ebone)
|
||||
return;
|
||||
|
||||
row= uiLayoutRow(layout, 0);
|
||||
// row= uiLayoutRow(layout, 0);
|
||||
RNA_pointer_create(&arm->id, &RNA_EditBone, ebone, &eboneptr);
|
||||
uiItemL(row, "", ICON_BONE_DATA);
|
||||
uiItemR(row, "", 0, &eboneptr, "name", 0);
|
||||
|
||||
|
||||
col= uiLayoutColumn(layout, 0);
|
||||
uiItemR(col, "Head", 0, &eboneptr, "head", 0);
|
||||
@ -732,10 +723,7 @@ static void v3d_editmetaball_buts(uiLayout *layout, Object *ob, float lim)
|
||||
|
||||
RNA_pointer_create(&mball->id, &RNA_MetaBall, mball, &mbptr);
|
||||
|
||||
row= uiLayoutRow(layout, 0);
|
||||
|
||||
uiItemL(row, "", ICON_META_DATA);
|
||||
uiItemR(row, "", 0, &mbptr, "name", 0);
|
||||
// row= uiLayoutRow(layout, 0);
|
||||
|
||||
RNA_pointer_create(&mball->id, &RNA_MetaElement, mball->lastelem, &ptr);
|
||||
|
||||
@ -1089,8 +1077,6 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
|
||||
col= uiLayoutColumn(pa->layout, 0);
|
||||
row= uiLayoutRow(col, 0);
|
||||
RNA_id_pointer_create(&ob->id, &obptr);
|
||||
uiItemL(row, "", ICON_OBJECT_DATA);
|
||||
uiItemR(row, "", 0, &obptr, "name", 0);
|
||||
|
||||
if(ob==obedit) {
|
||||
if(ob->type==OB_ARMATURE) v3d_editarmature_buts(col, v3d, ob, lim);
|
||||
|
Loading…
Reference in New Issue
Block a user