Warn on reserved filename

This commit is contained in:
Lubos Lenco 2017-11-23 22:05:07 +01:00
parent 4fba94f8a2
commit 800f204c31
2 changed files with 7 additions and 1 deletions

View file

@ -5,6 +5,7 @@ import bpy
import arm.utils
assets = []
reserved_names = ['return.']
khafile_defs = []
khafile_defs_last = []
embedded_data = []
@ -32,6 +33,10 @@ def add(file):
global assets
if file not in assets:
assets.append(file)
# Reserved file name
for s in reserved_names:
if s in file:
print('Armory Warning: File "{0}" contains reserved keyword, this will break C++ builds!'.format(file))
def add_khafile_def(d):
global khafile_defs

View file

@ -777,7 +777,8 @@ class ArmoryExporter:
o['mobile'] = False
if bobject.dupli_type == 'GROUP' and bobject.dupli_group != None:
o['group_ref'] = bobject.dupli_group.name
if len(bobject.dupli_group.objects) > 0:
o['group_ref'] = bobject.dupli_group.name
if bobject.arm_tilesheet != '':
o['tilesheet_ref'] = bobject.arm_tilesheet