CM3D2 Converter.mate_export

  1import bpy
  2from . import common
  3from . import compat
  4from . import cm3d2_data
  5from .translations.pgettext_functions import *
  6
  7
  8@compat.BlRegister()
  9class CNV_OT_export_cm3d2_mate(bpy.types.Operator):
 10    bl_idname = 'material.export_cm3d2_mate'
 11    bl_label = "mateとして保存"
 12    bl_description = "表示しているマテリアルをmateファイルとして保存します"
 13    bl_options = {'REGISTER', 'UNDO'}
 14
 15    filepath = bpy.props.StringProperty(subtype='FILE_PATH')
 16    filename_ext = ".mate"
 17    filter_glob = bpy.props.StringProperty(default="*.mate", options={'HIDDEN'})
 18
 19    is_backup = bpy.props.BoolProperty(name="ファイルをバックアップ", default=True, description="ファイルに上書きする場合にバックアップファイルを複製します")
 20
 21    version = bpy.props.IntProperty(name="ファイルバージョン", default=1000, min=1000, max=1111, soft_min=1000, soft_max=1111, step=1)
 22    name1 = bpy.props.StringProperty(name="名前1")
 23    name2 = bpy.props.StringProperty(name="名前2")
 24
 25    @classmethod
 26    def poll(cls, context):
 27        mate = getattr(context, 'material')
 28        if mate:
 29            if 'shader1' in mate and 'shader2' in mate:
 30                return True
 31        return False
 32
 33    def invoke(self, context, event):
 34        prefs = common.preferences()
 35        mate = context.material
 36        if prefs.mate_default_path:
 37            self.filepath = common.default_cm3d2_dir(prefs.mate_default_path, mate.name.lower(), "mate")
 38        else:
 39            self.filepath = common.default_cm3d2_dir(prefs.mate_export_path, mate.name.lower(), "mate")
 40        self.is_backup = bool(prefs.backup_ext)
 41        self.name1 = common.remove_serial_number(mate.name.lower())
 42        self.name2 = common.remove_serial_number(mate.name)
 43        context.window_manager.fileselect_add(self)
 44        return {'RUNNING_MODAL'}
 45
 46    def draw(self, context):
 47        row = self.layout.row()
 48        row.prop(self, 'is_backup', icon='FILE_BACKUP')
 49        if not common.preferences().backup_ext:
 50            row.enabled = False
 51        self.layout.prop(self, 'version', icon='LINENUMBERS_ON')
 52        self.layout.prop(self, 'name1', icon='SORTALPHA')
 53        self.layout.prop(self, 'name2', icon='SORTALPHA')
 54
 55    def execute(self, context):
 56        common.preferences().mate_export_path = self.filepath
 57
 58        try:
 59            writer = common.open_temporary(self.filepath, 'wb', is_backup=self.is_backup)
 60        except:
 61            self.report(type={'ERROR'}, message=f_tip_("ファイルを開くのに失敗しました、アクセス不可かファイルが存在しません。file={}", self.filepath))
 62            return {'CANCELLED'}
 63
 64        try:
 65            with writer:
 66                mate = context.material
 67                if compat.IS_LEGACY:
 68                    mat_data = cm3d2_data.MaterialHandler.parse_mate_old(mate, remove_serial=True)
 69                else:
 70                    mat_data = cm3d2_data.MaterialHandler.parse_mate(mate, remove_serial=True)
 71
 72                mat_data.version = self.version
 73                mat_data.name1 = self.name1
 74                mat_data.name2 = self.name2
 75
 76                mat_data.write(writer)
 77
 78        except common.CM3D2ExportException as e:
 79            self.report(type={'ERROR'}, message=str(e))
 80            return {'CANCELLED'}
 81
 82        return {'FINISHED'}
 83
 84
 85@compat.BlRegister()
 86class CNV_OT_export_cm3d2_mate_text(bpy.types.Operator):
 87    bl_idname = 'text.export_cm3d2_mate_text'
 88    bl_label = "mateとして保存"
 89    bl_description = "表示しているテキストデータをmateファイルとして保存します"
 90    bl_options = {'REGISTER', 'UNDO'}
 91
 92    filepath = bpy.props.StringProperty(subtype='FILE_PATH')
 93    filename_ext = ".mate"
 94    filter_glob = bpy.props.StringProperty(default="*.mate", options={'HIDDEN'})
 95
 96    is_backup = bpy.props.BoolProperty(name="ファイルをバックアップ", default=True, description="ファイルに上書きする場合にバックアップファイルを複製します")
 97
 98    version = bpy.props.IntProperty(name="ファイルバージョン", default=1000, min=1000, max=1111, soft_min=1000, soft_max=1111, step=1)
 99    name1 = bpy.props.StringProperty(name="名前1")
100    name2 = bpy.props.StringProperty(name="名前2")
101
102    @classmethod
103    def poll(cls, context):
104        edit_text = getattr(context, 'edit_text')
105        if edit_text:
106            data = edit_text.as_string()
107            if len(data) < 32:
108                return False
109            if "\ntex\n" in data or "\ncol\n" in data or "\nf\n" in data:
110                return True
111
112        return False
113
114    def invoke(self, context, event):
115        txt = context.edit_text
116        lines = txt.as_string().split('\n')
117        mate_name = lines[1]
118        if common.preferences().mate_default_path:
119            self.filepath = common.default_cm3d2_dir(common.preferences().mate_default_path, mate_name.lower(), "mate")
120        else:
121            self.filepath = common.default_cm3d2_dir(common.preferences().mate_export_path, mate_name.lower(), "mate")
122        try:
123            self.version = int(lines[0])
124        except:
125            self.version = 1000
126        if lines[1] != '***':
127            self.name1 = lines[1]
128        else:
129            self.name1 = lines[2]
130        self.name2 = lines[2]
131        context.window_manager.fileselect_add(self)
132        return {'RUNNING_MODAL'}
133
134    def draw(self, context):
135        row = self.layout.row()
136        row.prop(self, 'is_backup', icon='FILE_BACKUP')
137        if not common.preferences().backup_ext:
138            row.enabled = False
139        self.layout.prop(self, 'version', icon='LINENUMBERS_ON')
140        self.layout.prop(self, 'name1', icon='SORTALPHA')
141        self.layout.prop(self, 'name2', icon='SORTALPHA')
142
143    def execute(self, context):
144        common.preferences().mate_export_path = self.filepath
145
146        try:
147            text = context.edit_text.as_string()
148            mat_data = cm3d2_data.MaterialHandler.parse_text(text)
149        except Exception as e:
150            self.report(type={'ERROR'}, message='マテリアル情報の貼付けを中止します。' + str(e))
151            return {'CANCELLED'}
152
153        try:
154            file = common.open_temporary(self.filepath, 'wb', is_backup=self.is_backup)
155        except:
156            self.report(type={'ERROR'}, message=f_tip_("ファイルを開くのに失敗しました、アクセス不可かファイルが存在しません。file={}", self.filepath))
157            return {'CANCELLED'}
158
159        try:
160            with file:
161                mat_data.write(file, write_header=True)
162        except Exception as e:
163            self.report(type={'ERROR'}, message="mateファイルの出力に失敗、中止します。 構文を見直して下さい。" + str(e))
164            return {'CANCELLED'}
165
166        return {'FINISHED'}
167
168
169# テキストメニューに項目を登録
170def TEXT_MT_text(self, context):
171    self.layout.operator(CNV_OT_export_cm3d2_mate_text.bl_idname, icon_value=common.kiss_icon())
@compat.BlRegister()
class CNV_OT_export_cm3d2_mate(bpy_types.Operator):
 9@compat.BlRegister()
10class CNV_OT_export_cm3d2_mate(bpy.types.Operator):
11    bl_idname = 'material.export_cm3d2_mate'
12    bl_label = "mateとして保存"
13    bl_description = "表示しているマテリアルをmateファイルとして保存します"
14    bl_options = {'REGISTER', 'UNDO'}
15
16    filepath = bpy.props.StringProperty(subtype='FILE_PATH')
17    filename_ext = ".mate"
18    filter_glob = bpy.props.StringProperty(default="*.mate", options={'HIDDEN'})
19
20    is_backup = bpy.props.BoolProperty(name="ファイルをバックアップ", default=True, description="ファイルに上書きする場合にバックアップファイルを複製します")
21
22    version = bpy.props.IntProperty(name="ファイルバージョン", default=1000, min=1000, max=1111, soft_min=1000, soft_max=1111, step=1)
23    name1 = bpy.props.StringProperty(name="名前1")
24    name2 = bpy.props.StringProperty(name="名前2")
25
26    @classmethod
27    def poll(cls, context):
28        mate = getattr(context, 'material')
29        if mate:
30            if 'shader1' in mate and 'shader2' in mate:
31                return True
32        return False
33
34    def invoke(self, context, event):
35        prefs = common.preferences()
36        mate = context.material
37        if prefs.mate_default_path:
38            self.filepath = common.default_cm3d2_dir(prefs.mate_default_path, mate.name.lower(), "mate")
39        else:
40            self.filepath = common.default_cm3d2_dir(prefs.mate_export_path, mate.name.lower(), "mate")
41        self.is_backup = bool(prefs.backup_ext)
42        self.name1 = common.remove_serial_number(mate.name.lower())
43        self.name2 = common.remove_serial_number(mate.name)
44        context.window_manager.fileselect_add(self)
45        return {'RUNNING_MODAL'}
46
47    def draw(self, context):
48        row = self.layout.row()
49        row.prop(self, 'is_backup', icon='FILE_BACKUP')
50        if not common.preferences().backup_ext:
51            row.enabled = False
52        self.layout.prop(self, 'version', icon='LINENUMBERS_ON')
53        self.layout.prop(self, 'name1', icon='SORTALPHA')
54        self.layout.prop(self, 'name2', icon='SORTALPHA')
55
56    def execute(self, context):
57        common.preferences().mate_export_path = self.filepath
58
59        try:
60            writer = common.open_temporary(self.filepath, 'wb', is_backup=self.is_backup)
61        except:
62            self.report(type={'ERROR'}, message=f_tip_("ファイルを開くのに失敗しました、アクセス不可かファイルが存在しません。file={}", self.filepath))
63            return {'CANCELLED'}
64
65        try:
66            with writer:
67                mate = context.material
68                if compat.IS_LEGACY:
69                    mat_data = cm3d2_data.MaterialHandler.parse_mate_old(mate, remove_serial=True)
70                else:
71                    mat_data = cm3d2_data.MaterialHandler.parse_mate(mate, remove_serial=True)
72
73                mat_data.version = self.version
74                mat_data.name1 = self.name1
75                mat_data.name2 = self.name2
76
77                mat_data.write(writer)
78
79        except common.CM3D2ExportException as e:
80            self.report(type={'ERROR'}, message=str(e))
81            return {'CANCELLED'}
82
83        return {'FINISHED'}
bl_idname = 'material.export_cm3d2_mate'
bl_label = 'mateとして保存'
bl_description = '表示しているマテリアルをmateファイルとして保存します'
bl_options = {'REGISTER', 'UNDO'}
filepath: <_PropertyDeferred, <built-in function StringProperty>, {'subtype': 'FILE_PATH', 'attr': 'filepath'}> = <_PropertyDeferred, <built-in function StringProperty>, {'subtype': 'FILE_PATH', 'attr': 'filepath'}>
filename_ext = '.mate'
filter_glob: <_PropertyDeferred, <built-in function StringProperty>, {'default': '*.mate', 'options': {'HIDDEN'}, 'attr': 'filter_glob'}> = <_PropertyDeferred, <built-in function StringProperty>, {'default': '*.mate', 'options': {'HIDDEN'}, 'attr': 'filter_glob'}>
is_backup: <_PropertyDeferred, <built-in function BoolProperty>, {'name': 'ファイルをバックアップ', 'default': True, 'description': 'ファイルに上書きする場合にバックアップファイルを複製します', 'attr': 'is_backup'}> = <_PropertyDeferred, <built-in function BoolProperty>, {'name': 'ファイルをバックアップ', 'default': True, 'description': 'ファイルに上書きする場合にバックアップファイルを複製します', 'attr': 'is_backup'}>
version: <_PropertyDeferred, <built-in function IntProperty>, {'name': 'ファイルバージョン', 'default': 1000, 'min': 1000, 'max': 1111, 'soft_min': 1000, 'soft_max': 1111, 'step': 1, 'attr': 'version'}> = <_PropertyDeferred, <built-in function IntProperty>, {'name': 'ファイルバージョン', 'default': 1000, 'min': 1000, 'max': 1111, 'soft_min': 1000, 'soft_max': 1111, 'step': 1, 'attr': 'version'}>
name1: <_PropertyDeferred, <built-in function StringProperty>, {'name': '名前1', 'attr': 'name1'}> = <_PropertyDeferred, <built-in function StringProperty>, {'name': '名前1', 'attr': 'name1'}>
name2: <_PropertyDeferred, <built-in function StringProperty>, {'name': '名前2', 'attr': 'name2'}> = <_PropertyDeferred, <built-in function StringProperty>, {'name': '名前2', 'attr': 'name2'}>
@classmethod
def poll(cls, context):
26    @classmethod
27    def poll(cls, context):
28        mate = getattr(context, 'material')
29        if mate:
30            if 'shader1' in mate and 'shader2' in mate:
31                return True
32        return False
def invoke(self, context, event):
34    def invoke(self, context, event):
35        prefs = common.preferences()
36        mate = context.material
37        if prefs.mate_default_path:
38            self.filepath = common.default_cm3d2_dir(prefs.mate_default_path, mate.name.lower(), "mate")
39        else:
40            self.filepath = common.default_cm3d2_dir(prefs.mate_export_path, mate.name.lower(), "mate")
41        self.is_backup = bool(prefs.backup_ext)
42        self.name1 = common.remove_serial_number(mate.name.lower())
43        self.name2 = common.remove_serial_number(mate.name)
44        context.window_manager.fileselect_add(self)
45        return {'RUNNING_MODAL'}
def draw(self, context):
47    def draw(self, context):
48        row = self.layout.row()
49        row.prop(self, 'is_backup', icon='FILE_BACKUP')
50        if not common.preferences().backup_ext:
51            row.enabled = False
52        self.layout.prop(self, 'version', icon='LINENUMBERS_ON')
53        self.layout.prop(self, 'name1', icon='SORTALPHA')
54        self.layout.prop(self, 'name2', icon='SORTALPHA')
def execute(self, context):
56    def execute(self, context):
57        common.preferences().mate_export_path = self.filepath
58
59        try:
60            writer = common.open_temporary(self.filepath, 'wb', is_backup=self.is_backup)
61        except:
62            self.report(type={'ERROR'}, message=f_tip_("ファイルを開くのに失敗しました、アクセス不可かファイルが存在しません。file={}", self.filepath))
63            return {'CANCELLED'}
64
65        try:
66            with writer:
67                mate = context.material
68                if compat.IS_LEGACY:
69                    mat_data = cm3d2_data.MaterialHandler.parse_mate_old(mate, remove_serial=True)
70                else:
71                    mat_data = cm3d2_data.MaterialHandler.parse_mate(mate, remove_serial=True)
72
73                mat_data.version = self.version
74                mat_data.name1 = self.name1
75                mat_data.name2 = self.name2
76
77                mat_data.write(writer)
78
79        except common.CM3D2ExportException as e:
80            self.report(type={'ERROR'}, message=str(e))
81            return {'CANCELLED'}
82
83        return {'FINISHED'}
bl_rna = <bpy_struct, Struct("MATERIAL_OT_export_cm3d2_mate")>
Inherited Members
bpy_types.Operator
as_keywords
poll_message_set
builtins.bpy_struct
keys
values
items
get
pop
as_pointer
keyframe_insert
keyframe_delete
driver_add
driver_remove
is_property_set
property_unset
is_property_hidden
is_property_readonly
is_property_overridable_library
property_overridable_library_set
path_resolve
path_from_id
type_recast
bl_rna_get_subclass_py
bl_rna_get_subclass
id_properties_ensure
id_properties_clear
id_properties_ui
id_data
@compat.BlRegister()
class CNV_OT_export_cm3d2_mate_text(bpy_types.Operator):
 86@compat.BlRegister()
 87class CNV_OT_export_cm3d2_mate_text(bpy.types.Operator):
 88    bl_idname = 'text.export_cm3d2_mate_text'
 89    bl_label = "mateとして保存"
 90    bl_description = "表示しているテキストデータをmateファイルとして保存します"
 91    bl_options = {'REGISTER', 'UNDO'}
 92
 93    filepath = bpy.props.StringProperty(subtype='FILE_PATH')
 94    filename_ext = ".mate"
 95    filter_glob = bpy.props.StringProperty(default="*.mate", options={'HIDDEN'})
 96
 97    is_backup = bpy.props.BoolProperty(name="ファイルをバックアップ", default=True, description="ファイルに上書きする場合にバックアップファイルを複製します")
 98
 99    version = bpy.props.IntProperty(name="ファイルバージョン", default=1000, min=1000, max=1111, soft_min=1000, soft_max=1111, step=1)
100    name1 = bpy.props.StringProperty(name="名前1")
101    name2 = bpy.props.StringProperty(name="名前2")
102
103    @classmethod
104    def poll(cls, context):
105        edit_text = getattr(context, 'edit_text')
106        if edit_text:
107            data = edit_text.as_string()
108            if len(data) < 32:
109                return False
110            if "\ntex\n" in data or "\ncol\n" in data or "\nf\n" in data:
111                return True
112
113        return False
114
115    def invoke(self, context, event):
116        txt = context.edit_text
117        lines = txt.as_string().split('\n')
118        mate_name = lines[1]
119        if common.preferences().mate_default_path:
120            self.filepath = common.default_cm3d2_dir(common.preferences().mate_default_path, mate_name.lower(), "mate")
121        else:
122            self.filepath = common.default_cm3d2_dir(common.preferences().mate_export_path, mate_name.lower(), "mate")
123        try:
124            self.version = int(lines[0])
125        except:
126            self.version = 1000
127        if lines[1] != '***':
128            self.name1 = lines[1]
129        else:
130            self.name1 = lines[2]
131        self.name2 = lines[2]
132        context.window_manager.fileselect_add(self)
133        return {'RUNNING_MODAL'}
134
135    def draw(self, context):
136        row = self.layout.row()
137        row.prop(self, 'is_backup', icon='FILE_BACKUP')
138        if not common.preferences().backup_ext:
139            row.enabled = False
140        self.layout.prop(self, 'version', icon='LINENUMBERS_ON')
141        self.layout.prop(self, 'name1', icon='SORTALPHA')
142        self.layout.prop(self, 'name2', icon='SORTALPHA')
143
144    def execute(self, context):
145        common.preferences().mate_export_path = self.filepath
146
147        try:
148            text = context.edit_text.as_string()
149            mat_data = cm3d2_data.MaterialHandler.parse_text(text)
150        except Exception as e:
151            self.report(type={'ERROR'}, message='マテリアル情報の貼付けを中止します。' + str(e))
152            return {'CANCELLED'}
153
154        try:
155            file = common.open_temporary(self.filepath, 'wb', is_backup=self.is_backup)
156        except:
157            self.report(type={'ERROR'}, message=f_tip_("ファイルを開くのに失敗しました、アクセス不可かファイルが存在しません。file={}", self.filepath))
158            return {'CANCELLED'}
159
160        try:
161            with file:
162                mat_data.write(file, write_header=True)
163        except Exception as e:
164            self.report(type={'ERROR'}, message="mateファイルの出力に失敗、中止します。 構文を見直して下さい。" + str(e))
165            return {'CANCELLED'}
166
167        return {'FINISHED'}
bl_idname = 'text.export_cm3d2_mate_text'
bl_label = 'mateとして保存'
bl_description = '表示しているテキストデータをmateファイルとして保存します'
bl_options = {'REGISTER', 'UNDO'}
filepath: <_PropertyDeferred, <built-in function StringProperty>, {'subtype': 'FILE_PATH', 'attr': 'filepath'}> = <_PropertyDeferred, <built-in function StringProperty>, {'subtype': 'FILE_PATH', 'attr': 'filepath'}>
filename_ext = '.mate'
filter_glob: <_PropertyDeferred, <built-in function StringProperty>, {'default': '*.mate', 'options': {'HIDDEN'}, 'attr': 'filter_glob'}> = <_PropertyDeferred, <built-in function StringProperty>, {'default': '*.mate', 'options': {'HIDDEN'}, 'attr': 'filter_glob'}>
is_backup: <_PropertyDeferred, <built-in function BoolProperty>, {'name': 'ファイルをバックアップ', 'default': True, 'description': 'ファイルに上書きする場合にバックアップファイルを複製します', 'attr': 'is_backup'}> = <_PropertyDeferred, <built-in function BoolProperty>, {'name': 'ファイルをバックアップ', 'default': True, 'description': 'ファイルに上書きする場合にバックアップファイルを複製します', 'attr': 'is_backup'}>
version: <_PropertyDeferred, <built-in function IntProperty>, {'name': 'ファイルバージョン', 'default': 1000, 'min': 1000, 'max': 1111, 'soft_min': 1000, 'soft_max': 1111, 'step': 1, 'attr': 'version'}> = <_PropertyDeferred, <built-in function IntProperty>, {'name': 'ファイルバージョン', 'default': 1000, 'min': 1000, 'max': 1111, 'soft_min': 1000, 'soft_max': 1111, 'step': 1, 'attr': 'version'}>
name1: <_PropertyDeferred, <built-in function StringProperty>, {'name': '名前1', 'attr': 'name1'}> = <_PropertyDeferred, <built-in function StringProperty>, {'name': '名前1', 'attr': 'name1'}>
name2: <_PropertyDeferred, <built-in function StringProperty>, {'name': '名前2', 'attr': 'name2'}> = <_PropertyDeferred, <built-in function StringProperty>, {'name': '名前2', 'attr': 'name2'}>
@classmethod
def poll(cls, context):
103    @classmethod
104    def poll(cls, context):
105        edit_text = getattr(context, 'edit_text')
106        if edit_text:
107            data = edit_text.as_string()
108            if len(data) < 32:
109                return False
110            if "\ntex\n" in data or "\ncol\n" in data or "\nf\n" in data:
111                return True
112
113        return False
def invoke(self, context, event):
115    def invoke(self, context, event):
116        txt = context.edit_text
117        lines = txt.as_string().split('\n')
118        mate_name = lines[1]
119        if common.preferences().mate_default_path:
120            self.filepath = common.default_cm3d2_dir(common.preferences().mate_default_path, mate_name.lower(), "mate")
121        else:
122            self.filepath = common.default_cm3d2_dir(common.preferences().mate_export_path, mate_name.lower(), "mate")
123        try:
124            self.version = int(lines[0])
125        except:
126            self.version = 1000
127        if lines[1] != '***':
128            self.name1 = lines[1]
129        else:
130            self.name1 = lines[2]
131        self.name2 = lines[2]
132        context.window_manager.fileselect_add(self)
133        return {'RUNNING_MODAL'}
def draw(self, context):
135    def draw(self, context):
136        row = self.layout.row()
137        row.prop(self, 'is_backup', icon='FILE_BACKUP')
138        if not common.preferences().backup_ext:
139            row.enabled = False
140        self.layout.prop(self, 'version', icon='LINENUMBERS_ON')
141        self.layout.prop(self, 'name1', icon='SORTALPHA')
142        self.layout.prop(self, 'name2', icon='SORTALPHA')
def execute(self, context):
144    def execute(self, context):
145        common.preferences().mate_export_path = self.filepath
146
147        try:
148            text = context.edit_text.as_string()
149            mat_data = cm3d2_data.MaterialHandler.parse_text(text)
150        except Exception as e:
151            self.report(type={'ERROR'}, message='マテリアル情報の貼付けを中止します。' + str(e))
152            return {'CANCELLED'}
153
154        try:
155            file = common.open_temporary(self.filepath, 'wb', is_backup=self.is_backup)
156        except:
157            self.report(type={'ERROR'}, message=f_tip_("ファイルを開くのに失敗しました、アクセス不可かファイルが存在しません。file={}", self.filepath))
158            return {'CANCELLED'}
159
160        try:
161            with file:
162                mat_data.write(file, write_header=True)
163        except Exception as e:
164            self.report(type={'ERROR'}, message="mateファイルの出力に失敗、中止します。 構文を見直して下さい。" + str(e))
165            return {'CANCELLED'}
166
167        return {'FINISHED'}
bl_rna = <bpy_struct, Struct("TEXT_OT_export_cm3d2_mate_text")>
Inherited Members
bpy_types.Operator
as_keywords
poll_message_set
builtins.bpy_struct
keys
values
items
get
pop
as_pointer
keyframe_insert
keyframe_delete
driver_add
driver_remove
is_property_set
property_unset
is_property_hidden
is_property_readonly
is_property_overridable_library
property_overridable_library_set
path_resolve
path_from_id
type_recast
bl_rna_get_subclass_py
bl_rna_get_subclass
id_properties_ensure
id_properties_clear
id_properties_ui
id_data
def TEXT_MT_text(self, context):
171def TEXT_MT_text(self, context):
172    self.layout.operator(CNV_OT_export_cm3d2_mate_text.bl_idname, icon_value=common.kiss_icon())