13 file = open(path
, 'r')
14 self
.data
= json
.loads(file.read())
20 file = open(path
, 'w')
21 file.write(json
.dumps(self
.data
, indent
=4, sort_keys
=True))
25 return self
.data
.get('content', {}).get('assets', [None])[0]
27 def cmakelists_dir(self
):
28 return self
.data
.get('content', {}).get('code', [None])[0]
31 return self
.data
.get('require', {}).get('engine')
34 for plugin
in self
.plugins_list():
35 if 'managed' in plugin
.get('type', '').lower():
38 if plugin
.get('guid') is not None:
39 plugin_file
= cryplugin
.find(
41 'require', []).get('engine', '.'), plugin
['guid'])
42 _plugin
= cryplugin
.CryPlugin()
44 _plugin
.load(plugin_file
)
46 print("Unable to read plugin file %s" % (plugin_file
))
49 return not _plugin
.isNative()
54 return self
.data
.get('info', {}).get('name')
57 return self
.data
.get('content', {}).get('libs')
59 def plugins_list(self
):
60 return self
.data
.get('require', {}).get('plugins')
62 def require_list(self
):
63 return self
.data
.get('require', [])
65 def set_engine_id(self
, engine_id
):
66 self
.data
['require']['engine'] = engine_id
68 def set_plugin_list(self
, plugins
):
69 self
.data
['require']['plugins'] = plugins