bpy_types.Header

class IMAGE_HT_header:
def draw_funcs[1](self, context):
 7def menu_func(self, context):
 8    img = getattr(context, 'edit_image')
 9    if img and 'cm3d2_path' in img:
10        self.layout.label(text="CM3D2用: 内部パス", icon_value=common.kiss_icon())
11        row = self.layout.row()
12        row.prop(img, '["cm3d2_path"]', text="")
13        row.scale_x = 3.0
class INFO_HT_header:
def draw_funcs[1](self, context):
11def menu_func(self, context):
12    self.layout.operator('mesh.vertices_count_checker', icon_value=common.kiss_icon())
class TEXT_HT_header:
def draw_funcs[1](self, context):
10def menu_func(self, context):
11    texts = bpy.data.texts
12    text_keys = texts.keys()
13    self.layout.label(text="CM3D2用:", icon_value=common.kiss_icon())
14    row = self.layout.row(align=True)
15    if 'BoneData' in text_keys:
16        txt = bpy.data.texts['BoneData']
17        line_count = 0
18        for line in txt.as_string().split('\n'):
19            if line:
20                line_count += 1
21        row.operator('text.show_text', icon='ARMATURE_DATA', text=f_iface_("BoneData ({})", line_count, msgctxt='Operator')).name = 'BoneData'
22    if 'LocalBoneData' in text_keys:
23        txt = bpy.data.texts['LocalBoneData']
24        line_count = 0
25        for line in txt.as_string().split('\n'):
26            if line:
27                line_count += 1
28        row.operator('text.show_text', icon='BONE_DATA', text=f_iface_("LocalBoneData ({})", line_count, msgctxt='Operator')).name = 'LocalBoneData'
29    if 'BoneData' in text_keys and 'LocalBoneData' in text_keys:
30        if 'BoneData' in texts:
31            if 'BaseBone' not in texts['BoneData']:
32                texts['BoneData']['BaseBone'] = ""
33            row.prop(texts['BoneData'], '["BaseBone"]', text="")
34        row.operator('text.copy_text_bone_data', icon='COPYDOWN', text="")
35        row.operator('text.paste_text_bone_data', icon='PASTEDOWN', text="")
36    if "Material:0" in text_keys:
37        self.layout.label(text="", icon='MATERIAL_DATA')
38        row = self.layout.row(align=True)
39        pass_count = 0
40        for i in range(99):
41            name = "Material:" + str(i)
42            if name in text_keys:
43                sub_row = row.row(align=True)
44                sub_row.scale_x = 0.75
45                sub_row.operator('text.show_text', text=str(i)).name = name
46            else:
47                pass_count += 1
48            if 9 < pass_count:
49                break
50        if "Material:0" in text_keys:
51            row.operator('text.remove_all_material_texts', icon='X', text="")