- for pair in compile_material(mat):
- decl = pair[0]
- pdef = pair[1]
- prop = pair[2]
-
- if isinstance(prop,bpy.types.Image):
- flags = 0
- if 'flags' in pdef: flags = pdef['flags']
- if prop not in image_jobs:
- image_jobs += [(prop,)]
- prop.cxr_data.flags = flags
-
- # Convexer jobs
- static.JOBID = 0
- static.JOBINFO = []
-
- if settings.comp_vmf:
- static.JOBINFO += [{
- "title": "Convexer",
+ if mat.cxr_data.shader == 'Builtin': continue
+ fp.write(F"{asset_path('materials',mat)}.vmt\n")
+ fp.write(F"{cxr_winepath(asset_full_path('materials',mat))}.vmt\n")
+
+ for img_job in image_jobs:
+ img = img_job[0]
+ fp.write(F"{asset_path('materials',img)}.vtf\n")
+ fp.write(F"{cxr_winepath(asset_full_path('materials',img))}.vtf\n")
+
+ for mdl in a_models:
+ local = asset_path('models',mdl)
+ winep = cxr_winepath(asset_full_path('models',mdl))
+
+ fp.write(F"{local}.vvd\n")
+ fp.write(F"{winep}.vvd\n")
+ fp.write(F"{local}.dx90.vtx\n")
+ fp.write(F"{winep}.dx90.vtx\n")
+ fp.write(F"{local}.mdl\n")
+ fp.write(F"{winep}.mdl\n")
+ fp.write(F"{local}.vvd\n")
+ fp.write(F"{winep}.vvd\n")
+
+ if cxr_modelsrc_vphys(mdl):
+ fp.write(F"{local}.phy\n")
+ fp.write(F"{winep}.phy\n")
+
+ # Convexer jobs
+ static.JOBID = 0
+ static.JOBINFO = []
+
+ if settings.comp_vmf:
+ static.JOBINFO += [{
+ "title": "Convexer",
+ "w": 20,
+ "colour": (1.0,0.3,0.1,1.0),
+ "exec": cxr_export_vmf,
+ "jobs": [(sceneinfo,output_vmf)]
+ }]
+
+ if settings.comp_textures:
+ if len(image_jobs) > 0:
+ static.JOBINFO += [{
+ "title": "Textures",
+ "w": 40,
+ "colour": (0.1,1.0,0.3,1.0),
+ "exec": compile_image,
+ "jobs": image_jobs
+ }]
+
+ game = cxr_winepath( settings.subdir )
+ args = [ \
+ '-game', game, settings.project_name
+ ]
+
+ # FBX stage
+ if settings.comp_models:
+ if len(model_jobs) > 0:
+ static.JOBINFO += [{
+ "title": "Batches",
+ "w": 25,
+ "colour": (0.5,0.5,1.0,1.0),
+ "exec": cxr_export_modelsrc,
+ "jobs": model_jobs
+ }]
+
+ if len(qc_jobs) > 0:
+ static.JOBINFO += [{
+ "title": "StudioMDL",