else: colour = colourwait
px = (cur + (i)*sfsub) * sf
- px1 = (cur + (i+1.0)*sfsub) * sf - 0.003
+ px1 = (cur + (i+1.0)*sfsub) * sf
i += 1
verts += [(px,0), (px, h), (px1, 0.0), (px1,h)]
def _buildsolid( cmd ):
nonlocal m
+
+ print( F"{vmfinfo.brush_count} :: {cmd['object'].name}" )
baked = mesh_cxr_format( cmd['object'] )
world = libcxr_decompose.call( baked, None )
# Convexer jobs
static.JOBID = 0
static.JOBINFO = []
-
- static.JOBINFO += [{
- "title": "Convexer",
- "w": 20,
- "colour": (1.0,0.3,0.1,1.0),
- "exec": cxr_export_vmf,
- "jobs": [(sceneinfo,output_vmf)]
- }]
- 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
- }]
-
- # FBX stage
-
- if len(sceneinfo['heros']) > 0:
- static.JOBINFO += [{
- "title": "Batches",
- "w": 25,
- "colour": (0.5,0.5,1.0,1.0),
- "exec": cxr_export_modelsrc,
- "jobs": [(h['collection'], h['origin'], asset_dir, \
- settings.project_name, h['transform']) for h in \
- sceneinfo['heros']]
+ 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)]
}]
- # VBSP stage
+ 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 = 'z:'+settings.subdir.replace('/','\\')
args = [ \
'-game', game, settings.project_name
]
+
+ # FBX stage
+ if settings.comp_models:
+ if len(sceneinfo['heros']) > 0:
+ static.JOBINFO += [{
+ "title": "Batches",
+ "w": 25,
+ "colour": (0.5,0.5,1.0,1.0),
+ "exec": cxr_export_modelsrc,
+ "jobs": [(h['collection'], h['origin'], asset_dir, \
+ settings.project_name, h['transform']) for h in \
+ sceneinfo['heros']]
+ }]
- if len(qc_jobs) > 0:
+ if len(qc_jobs) > 0:
+ static.JOBINFO += [{
+ "title": "StudioMDL",
+ "w": 20,
+ "colour": (0.8,0.1,0.1,1.0),
+ "exec": "studiomdl",
+ "jobs": [[settings[F'exe_studiomdl']] + [\
+ '-nop4', '-game', game, qc] for qc in qc_jobs],
+ "cwd": asset_dir
+ }]
+
+ # VBSP stage
+ if settings.comp_compile:
static.JOBINFO += [{
- "title": "StudioMDL",
- "w": 20,
- "colour": (0.8,0.1,0.1,1.0),
- "exec": "studiomdl",
- "jobs": [[settings[F'exe_studiomdl']] + [\
- '-nop4', '-game', game, qc] for qc in qc_jobs],
- "cwd": asset_dir
+ "title": "VBSP",
+ "w": 25,
+ "colour": (0.1,0.2,1.0,1.0),
+ "exec": "vbsp",
+ "jobs": [[settings[F'exe_vbsp']] + args],
+ "cwd": directory
+ }]
+
+ static.JOBINFO += [{
+ "title": "VVIS",
+ "w": 25,
+ "colour": (0.9,0.5,0.5,1.0),
+ "exec": "vvis",
+ "jobs": [[settings[F'exe_vvis']] + args],
+ "cwd": directory
+ }]
+
+ static.JOBINFO += [{
+ "title": "VRAD",
+ "w": 25,
+ "colour": (0.9,0.2,0.3,1.0),
+ "exec": "vrad",
+ "jobs": [[settings[F'exe_vrad']] + args],
+ "cwd": directory
}]
- static.JOBINFO += [{
- "title": "VBSP",
- "w": 25,
- "colour": (0.1,0.2,1.0,1.0),
- "exec": "vbsp",
- "jobs": [[settings[F'exe_vbsp']] + args],
- "cwd": directory
- }]
-
- static.JOBINFO += [{
- "title": "VVIS",
- "w": 25,
- "colour": (0.9,0.5,0.5,1.0),
- "exec": "vvis",
- "jobs": [[settings[F'exe_vvis']] + args],
- "cwd": directory
- }]
-
- static.JOBINFO += [{
- "title": "VRAD",
- "w": 25,
- "colour": (0.9,0.2,0.3,1.0),
- "exec": "vrad",
- "jobs": [[settings[F'exe_vrad']] + args],
- "cwd": directory
- }]
-
- static.JOBINFO += [{
- "title": "CXR",
- "w": 5,
- "colour": (0.0,1.0,0.4,1.0),
- "exec": cxr_patchmap,
- "jobs": [(F"{directory}/{settings.project_name}.bsp",\
- F"{settings.subdir}/maps/{settings.project_name}.bsp")]
- }]
+ static.JOBINFO += [{
+ "title": "CXR",
+ "w": 5,
+ "colour": (0.0,1.0,0.4,1.0),
+ "exec": cxr_patchmap,
+ "jobs": [(F"{directory}/{settings.project_name}.bsp",\
+ F"{settings.subdir}/maps/{settings.project_name}.bsp")]
+ }]
static.USER_EXIT=False
static.TIMER=wm.event_timer_add(0.1,window=context.window)
box.prop(settings, "exe_vbsp")
box.prop(settings, "exe_vvis")
box.prop(settings, "exe_vrad")
+
+ box = box.box()
+ row = box.row()
+ row.prop(settings,"comp_vmf")
+ row.prop(settings,"comp_textures")
+ row.prop(settings,"comp_models")
+ row.prop(settings,"comp_compile")
text = "Compile" if CXR_COMPILER_CHAIN.TIMER == None else "Cancel"
row = box.row()
image_quality: bpy.props.IntProperty(name="Texture Quality (0-18)",\
default=8, min=0, max=18 )
+ comp_vmf: bpy.props.BoolProperty(name="VMF",default=True)
+ comp_models: bpy.props.BoolProperty(name="Models",default=True)
+ comp_textures: bpy.props.BoolProperty(name="Textures",default=True)
+ comp_compile: bpy.props.BoolProperty(name="Compile",default=True)
classes = [ CXR_RELOAD, CXR_DEV_OPERATOR, CXR_INTERFACE, \
CXR_MATERIAL_PANEL, CXR_IMAGE_SETTINGS,\