Haxe clean up
This commit is contained in:
parent
71929bd32f
commit
6db0871c22
|
@ -1,3 +0,0 @@
|
||||||
package armory;
|
|
||||||
|
|
||||||
typedef App = iron.App;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef CameraData = iron.data.CameraData;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef Data = iron.data.Data;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef LampData = iron.data.LampData;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef MaterialData = iron.data.MaterialData;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef Mesh = iron.data.Mesh;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef MeshData = iron.data.MeshData;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef ParticleData = iron.data.ParticleData;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef PipelineData = iron.data.PipelineData;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef RenderPath = iron.data.RenderPath;
|
|
|
@ -1,43 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef TSceneFormat = iron.data.SceneFormat.TSceneFormat;
|
|
||||||
typedef TMeshData = iron.data.SceneFormat.TMeshData;
|
|
||||||
typedef TSkin = iron.data.SceneFormat.TSkin;
|
|
||||||
typedef TSkeleton = iron.data.SceneFormat.TSkeleton;
|
|
||||||
typedef TVertexArray = iron.data.SceneFormat.TVertexArray;
|
|
||||||
typedef TIndexArray = iron.data.SceneFormat.TIndexArray;
|
|
||||||
typedef TLampData = iron.data.SceneFormat.TLampData;
|
|
||||||
typedef TCameraData = iron.data.SceneFormat.TCameraData;
|
|
||||||
typedef TMaterialData = iron.data.SceneFormat.TMaterialData;
|
|
||||||
typedef TShaderOverride = iron.data.SceneFormat.TShaderOverride;
|
|
||||||
typedef TMaterialContext = iron.data.SceneFormat.TMaterialContext;
|
|
||||||
typedef TBindConstant = iron.data.SceneFormat.TBindConstant;
|
|
||||||
typedef TBindTexture = iron.data.SceneFormat.TBindTexture;
|
|
||||||
typedef TShaderData = iron.data.SceneFormat.TShaderData;
|
|
||||||
typedef TVertexData = iron.data.SceneFormat.TVertexData;
|
|
||||||
typedef TShaderContext = iron.data.SceneFormat.TShaderContext;
|
|
||||||
typedef TShaderConstant = iron.data.SceneFormat.TShaderConstant;
|
|
||||||
typedef TTextureUnit = iron.data.SceneFormat.TTextureUnit;
|
|
||||||
typedef TRenderPathData = iron.data.SceneFormat.TRenderPathData;
|
|
||||||
typedef TRenderPathTarget = iron.data.SceneFormat.TRenderPathTarget;
|
|
||||||
typedef TRenderPathDepthBuffer = iron.data.SceneFormat.TRenderPathDepthBuffer;
|
|
||||||
typedef TRenderPathStage = iron.data.SceneFormat.TRenderPathStage;
|
|
||||||
typedef TSpeakerData = iron.data.SceneFormat.TSpeakerData;
|
|
||||||
typedef TWorldData = iron.data.SceneFormat.TWorldData;
|
|
||||||
typedef TGreasePencilData = iron.data.SceneFormat.TGreasePencilData;
|
|
||||||
typedef TGreasePencilLayer = iron.data.SceneFormat.TGreasePencilLayer;
|
|
||||||
typedef TGreasePencilFrame = iron.data.SceneFormat.TGreasePencilFrame;
|
|
||||||
typedef TGreasePencilPalette = iron.data.SceneFormat.TGreasePencilPalette;
|
|
||||||
typedef TGreasePencilPaletteColor = iron.data.SceneFormat.TGreasePencilPaletteColor;
|
|
||||||
typedef TProbe = iron.data.SceneFormat.TProbe;
|
|
||||||
typedef TIrradiance = iron.data.SceneFormat.TIrradiance;
|
|
||||||
typedef TParticleData = iron.data.SceneFormat.TParticleData;
|
|
||||||
typedef TObj = iron.data.SceneFormat.TObj;
|
|
||||||
typedef TGroup = iron.data.SceneFormat.TGroup;
|
|
||||||
typedef TConstraint = iron.data.SceneFormat.TConstraint;
|
|
||||||
typedef TParticleReference = iron.data.SceneFormat.TParticleReference;
|
|
||||||
typedef TTrait = iron.data.SceneFormat.TTrait;
|
|
||||||
typedef TTransform = iron.data.SceneFormat.TTransform;
|
|
||||||
typedef TAnimationTransform = iron.data.SceneFormat.TAnimationTransform;
|
|
||||||
typedef TAnimation = iron.data.SceneFormat.TAnimation;
|
|
||||||
typedef TTrack = iron.data.SceneFormat.TTrack;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef ShaderData = iron.data.ShaderData;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.data;
|
|
||||||
|
|
||||||
typedef WorldData = iron.data.WorldData;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.math;
|
|
||||||
|
|
||||||
typedef Ray = iron.math.Ray;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.math;
|
|
||||||
|
|
||||||
typedef RayCaster = iron.math.RayCaster;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.object;
|
|
||||||
|
|
||||||
typedef Animation = iron.object.Animation;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.object;
|
|
||||||
|
|
||||||
typedef CameraObject = iron.object.CameraObject;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.object;
|
|
||||||
|
|
||||||
typedef DecalObject = iron.object.DecalObject;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.object;
|
|
||||||
|
|
||||||
typedef LampObject = iron.object.LampObject;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.object;
|
|
||||||
|
|
||||||
typedef MeshObject = iron.object.MeshObject;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.object;
|
|
||||||
|
|
||||||
typedef ParticleSystem = iron.object.ParticleSystem;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.object;
|
|
||||||
|
|
||||||
typedef SpeakerObject = iron.object.SpeakerObject;
|
|
|
@ -1,26 +0,0 @@
|
||||||
package armory.renderpath;
|
|
||||||
|
|
||||||
import iron.data.RenderPath;
|
|
||||||
|
|
||||||
// Fast Fourier transform data
|
|
||||||
class FFT {
|
|
||||||
|
|
||||||
static var firstFrame = true;
|
|
||||||
|
|
||||||
// public static function init() {
|
|
||||||
// var res = 512;
|
|
||||||
// var phaseArray = new haxe.io.Float32Array(res * res * 4);
|
|
||||||
// for (i in 0...res) {
|
|
||||||
// for (j in 0...res) {
|
|
||||||
// phaseArray[i * res * 4 + j * 4] = Math.random() * 2.0 * Math.PI;
|
|
||||||
// phaseArray[i * res * 4 + j * 4 + 1] = 0;
|
|
||||||
// phaseArray[i * res * 4 + j * 4 + 2] = 0;
|
|
||||||
// phaseArray[i * res * 4 + j * 4 + 3] = 0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public static function run(path:RenderPath) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.system;
|
|
||||||
|
|
||||||
typedef Audio = iron.system.Audio;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.system;
|
|
||||||
|
|
||||||
typedef Storage = iron.system.Storage;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.system;
|
|
||||||
|
|
||||||
typedef Time = iron.system.Time;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.system;
|
|
||||||
|
|
||||||
typedef Tween = iron.system.Tween;
|
|
|
@ -1,3 +0,0 @@
|
||||||
package armory.system;
|
|
||||||
|
|
||||||
typedef VR = iron.system.VR;
|
|
|
@ -1,35 +0,0 @@
|
||||||
package armory.trait.internal;
|
|
||||||
|
|
||||||
import iron.Trait;
|
|
||||||
|
|
||||||
class JSScript extends Trait {
|
|
||||||
|
|
||||||
static var api:JSScriptAPI = null;
|
|
||||||
|
|
||||||
public function new(scriptName:String) {
|
|
||||||
super();
|
|
||||||
|
|
||||||
notifyOnInit(function() {
|
|
||||||
|
|
||||||
iron.data.Data.getBlob(scriptName + '.js', function(blob:kha.Blob) {
|
|
||||||
|
|
||||||
var header = "var App = armory.App;
|
|
||||||
var Scene = armory.Scene;
|
|
||||||
var Data = armory.Data;
|
|
||||||
var Quat = armory.math.Quat;
|
|
||||||
var Mat4 = armory.math.Mat4;
|
|
||||||
var Vec4 = armory.math.Vec4;";
|
|
||||||
var src = header + blob.toString();
|
|
||||||
#if js
|
|
||||||
if (api == null) api = new JSScriptAPI();
|
|
||||||
untyped __js__("var self = {0};", object);
|
|
||||||
#if !webgl // Krom
|
|
||||||
untyped __js__("var window = this;");
|
|
||||||
#end
|
|
||||||
untyped __js__("eval(src);");
|
|
||||||
#end
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
package armory.trait.internal;
|
|
||||||
|
|
||||||
#if cpp
|
|
||||||
|
|
||||||
class JSScriptAPI { }
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
@:expose("armory")
|
|
||||||
class JSScriptAPI {
|
|
||||||
|
|
||||||
public static var App = iron.App;
|
|
||||||
public static var Scene = iron.Scene;
|
|
||||||
public static var Time = iron.system.Time;
|
|
||||||
public static var Object = iron.object.Object;
|
|
||||||
public static var Data = iron.data.Data;
|
|
||||||
|
|
||||||
public function new() { }
|
|
||||||
}
|
|
||||||
|
|
||||||
@:expose("armory.math")
|
|
||||||
class JSScriptAPIMath {
|
|
||||||
|
|
||||||
public static var Vec4 = iron.math.Vec4;
|
|
||||||
public static var Mat4 = iron.math.Mat4;
|
|
||||||
public static var Quat = iron.math.Quat;
|
|
||||||
}
|
|
||||||
|
|
||||||
#end
|
|
|
@ -1850,9 +1850,9 @@ class ArmoryExporter:
|
||||||
if ArmoryExporter.option_mesh_per_file:
|
if ArmoryExporter.option_mesh_per_file:
|
||||||
fp = self.get_meshes_file_path('mesh_' + oid, compressed=self.is_compress(bobject.data))
|
fp = self.get_meshes_file_path('mesh_' + oid, compressed=self.is_compress(bobject.data))
|
||||||
assets.add(fp)
|
assets.add(fp)
|
||||||
if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
|
# if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
|
||||||
sdf_path = fp.replace('/mesh_', '/sdf_')
|
# sdf_path = fp.replace('/mesh_', '/sdf_')
|
||||||
assets.add(sdf_path)
|
# assets.add(sdf_path)
|
||||||
if self.is_mesh_cached(bobject) == True and os.path.exists(fp):
|
if self.is_mesh_cached(bobject) == True and os.path.exists(fp):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1992,38 +1992,38 @@ class ArmoryExporter:
|
||||||
if bobject.data.arm_dynamic_usage:
|
if bobject.data.arm_dynamic_usage:
|
||||||
o['dynamic_usage'] = bobject.data.arm_dynamic_usage
|
o['dynamic_usage'] = bobject.data.arm_dynamic_usage
|
||||||
|
|
||||||
if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
|
# if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
|
||||||
o['sdf_ref'] = 'sdf_' + oid
|
# o['sdf_ref'] = 'sdf_' + oid
|
||||||
|
|
||||||
self.write_mesh(bobject, fp, o)
|
self.write_mesh(bobject, fp, o)
|
||||||
|
|
||||||
if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
|
# if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
|
||||||
# Copy input
|
# # Copy input
|
||||||
sdk_path = arm.utils.get_sdk_path()
|
# sdk_path = arm.utils.get_sdk_path()
|
||||||
sdfgen_path = sdk_path + '/armory/tools/sdfgen'
|
# sdfgen_path = sdk_path + '/armory/tools/sdfgen'
|
||||||
shutil.copy(fp, sdfgen_path + '/krom/mesh.arm')
|
# shutil.copy(fp, sdfgen_path + '/krom/mesh.arm')
|
||||||
# Extract basecolor
|
# # Extract basecolor
|
||||||
# Assume Armpry PBR with linked texture for now
|
# # Assume Armpry PBR with linked texture for now
|
||||||
# mat = bobject.material_slots[0].material
|
# # mat = bobject.material_slots[0].material
|
||||||
# img = None
|
# # img = None
|
||||||
# for n in mat.node_tree.nodes:
|
# # for n in mat.node_tree.nodes:
|
||||||
# if n.type == 'GROUP' and n.node_tree.name.startswith('Armory PBR') and n.inputs[0].is_linked:
|
# # if n.type == 'GROUP' and n.node_tree.name.startswith('Armory PBR') and n.inputs[0].is_linked:
|
||||||
# img = n.inputs[0].links[0].from_node.image
|
# # img = n.inputs[0].links[0].from_node.image
|
||||||
# fp_img = bpy.path.abspath(img.filepath)
|
# # fp_img = bpy.path.abspath(img.filepath)
|
||||||
# shutil.copy(fp_img, sdfgen_path + '/krom/mesh.png')
|
# # shutil.copy(fp_img, sdfgen_path + '/krom/mesh.png')
|
||||||
# Run
|
# # Run
|
||||||
krom_location, krom_path = arm.utils.krom_paths()
|
# krom_location, krom_path = arm.utils.krom_paths()
|
||||||
krom_dir = sdfgen_path + '/krom'
|
# krom_dir = sdfgen_path + '/krom'
|
||||||
krom_res = sdfgen_path + '/krom'
|
# krom_res = sdfgen_path + '/krom'
|
||||||
subprocess.check_output([krom_path, krom_dir, krom_res, '--nosound', '--nowindow'])
|
# subprocess.check_output([krom_path, krom_dir, krom_res, '--nosound', '--nowindow'])
|
||||||
# Copy output
|
# # Copy output
|
||||||
sdf_path = fp.replace('/mesh_', '/sdf_')
|
# sdf_path = fp.replace('/mesh_', '/sdf_')
|
||||||
shutil.copy('out.bin', sdf_path)
|
# shutil.copy('out.bin', sdf_path)
|
||||||
assets.add(sdf_path)
|
# assets.add(sdf_path)
|
||||||
os.remove('out.bin')
|
# os.remove('out.bin')
|
||||||
os.remove(sdfgen_path + '/krom/mesh.arm')
|
# os.remove(sdfgen_path + '/krom/mesh.arm')
|
||||||
# if img != None:
|
# # if img != None:
|
||||||
# os.remove(sdfgen_path + '/krom/mesh.png')
|
# # os.remove(sdfgen_path + '/krom/mesh.png')
|
||||||
|
|
||||||
def export_mesh_quality(self, exportMesh, bobject, fp, o):
|
def export_mesh_quality(self, exportMesh, bobject, fp, o):
|
||||||
# Triangulate mesh and remap vertices to eliminate duplicates
|
# Triangulate mesh and remap vertices to eliminate duplicates
|
||||||
|
@ -3111,19 +3111,6 @@ class ArmoryExporter:
|
||||||
x['class_name'] = arm.utils.safestr(bpy.data.worlds['Arm'].arm_project_package) + '.node.' + arm.utils.safesrc(t.nodes_name_prop)
|
x['class_name'] = arm.utils.safestr(bpy.data.worlds['Arm'].arm_project_package) + '.node.' + arm.utils.safesrc(t.nodes_name_prop)
|
||||||
elif t.type_prop == 'WebAssembly':
|
elif t.type_prop == 'WebAssembly':
|
||||||
pass
|
pass
|
||||||
# basename = t.jsscript_prop.split('.')[0]
|
|
||||||
# x['type'] = 'Script'
|
|
||||||
# x['class_name'] = 'armory.trait.internal.JSScript'
|
|
||||||
# x['parameters'] = ["'" + basename + "'"]
|
|
||||||
# scriptspath = arm.utils.get_fp_build() + '/compiled/scripts/'
|
|
||||||
# if not os.path.exists(scriptspath):
|
|
||||||
# os.makedirs(scriptspath)
|
|
||||||
# # Write js to file
|
|
||||||
# assetpath = arm.utils.build_dir() + '/compiled/scripts/' + t.jsscript_prop + '.js'
|
|
||||||
# targetpath = arm.utils.get_fp() + '/' + assetpath
|
|
||||||
# with open(targetpath, 'w') as f:
|
|
||||||
# f.write(bpy.data.texts[t.jsscript_prop].as_string())
|
|
||||||
# assets.add(assetpath)
|
|
||||||
elif t.type_prop == 'UI Canvas':
|
elif t.type_prop == 'UI Canvas':
|
||||||
ArmoryExporter.export_ui = True
|
ArmoryExporter.export_ui = True
|
||||||
x['type'] = 'Script'
|
x['type'] = 'Script'
|
||||||
|
|
|
@ -124,17 +124,17 @@ def build_node_tree(world):
|
||||||
elif rpdat.rp_gi == 'Voxel AO':
|
elif rpdat.rp_gi == 'Voxel AO':
|
||||||
voxelao = True
|
voxelao = True
|
||||||
# SS
|
# SS
|
||||||
if rpdat.rp_dfrs:
|
# if rpdat.rp_dfrs:
|
||||||
wrd.world_defs += '_DFRS'
|
# wrd.world_defs += '_DFRS'
|
||||||
assets.add_khafile_def('arm_sdf')
|
# assets.add_khafile_def('arm_sdf')
|
||||||
if rpdat.rp_dfao:
|
# if rpdat.rp_dfao:
|
||||||
wrd.world_defs += '_DFAO'
|
# wrd.world_defs += '_DFAO'
|
||||||
assets.add_khafile_def('arm_sdf')
|
# assets.add_khafile_def('arm_sdf')
|
||||||
if rpdat.rp_dfgi:
|
# if rpdat.rp_dfgi:
|
||||||
wrd.world_defs += '_DFGI'
|
# wrd.world_defs += '_DFGI'
|
||||||
assets.add_khafile_def('arm_sdf')
|
# assets.add_khafile_def('arm_sdf')
|
||||||
wrd.world_defs += '_Rad' # Always do radiance for gi
|
# wrd.world_defs += '_Rad' # Always do radiance for gi
|
||||||
wrd.world_defs += '_Irr'
|
# wrd.world_defs += '_Irr'
|
||||||
if rpdat.rp_ssgi == 'RTGI' or rpdat.rp_ssgi == 'RTAO':
|
if rpdat.rp_ssgi == 'RTGI' or rpdat.rp_ssgi == 'RTAO':
|
||||||
if rpdat.rp_ssgi == 'RTGI':
|
if rpdat.rp_ssgi == 'RTGI':
|
||||||
wrd.world_defs += '_RTGI'
|
wrd.world_defs += '_RTGI'
|
||||||
|
|
|
@ -192,7 +192,7 @@ def init_properties():
|
||||||
bpy.types.Mesh.arm_aabb = bpy.props.FloatVectorProperty(name="AABB", size=3, default=[0,0,0])
|
bpy.types.Mesh.arm_aabb = bpy.props.FloatVectorProperty(name="AABB", size=3, default=[0,0,0])
|
||||||
bpy.types.Mesh.arm_dynamic_usage = bpy.props.BoolProperty(name="Dynamic Usage", description="Mesh data can change at runtime", default=False)
|
bpy.types.Mesh.arm_dynamic_usage = bpy.props.BoolProperty(name="Dynamic Usage", description="Mesh data can change at runtime", default=False)
|
||||||
bpy.types.Mesh.arm_compress = bpy.props.BoolProperty(name="Compress", description="Pack data into zip file", default=False)
|
bpy.types.Mesh.arm_compress = bpy.props.BoolProperty(name="Compress", description="Pack data into zip file", default=False)
|
||||||
bpy.types.Mesh.arm_sdfgen = bpy.props.BoolProperty(name="Generate SDF", description="Make signed distance field data", default=False, update=invalidate_mesh_cache)
|
# bpy.types.Mesh.arm_sdfgen = bpy.props.BoolProperty(name="Generate SDF", description="Make signed distance field data", default=False, update=invalidate_mesh_cache)
|
||||||
bpy.types.Curve.arm_cached = bpy.props.BoolProperty(name="Mesh Cached", description="No need to reexport curve data", default=False)
|
bpy.types.Curve.arm_cached = bpy.props.BoolProperty(name="Mesh Cached", description="No need to reexport curve data", default=False)
|
||||||
bpy.types.Curve.arm_compress = bpy.props.BoolProperty(name="Compress", description="Pack data into zip file", default=False)
|
bpy.types.Curve.arm_compress = bpy.props.BoolProperty(name="Compress", description="Pack data into zip file", default=False)
|
||||||
bpy.types.Curve.arm_dynamic_usage = bpy.props.BoolProperty(name="Dynamic Data Usage", description="Curve data can change at runtime", default=False)
|
bpy.types.Curve.arm_dynamic_usage = bpy.props.BoolProperty(name="Dynamic Data Usage", description="Curve data can change at runtime", default=False)
|
||||||
|
|
|
@ -158,8 +158,8 @@ class DataPropsPanel(bpy.types.Panel):
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(obj.data, 'arm_dynamic_usage')
|
row.prop(obj.data, 'arm_dynamic_usage')
|
||||||
row.prop(obj.data, 'arm_compress')
|
row.prop(obj.data, 'arm_compress')
|
||||||
if obj.type == 'MESH':
|
# if obj.type == 'MESH':
|
||||||
layout.prop(obj.data, 'arm_sdfgen')
|
# layout.prop(obj.data, 'arm_sdfgen')
|
||||||
layout.operator("arm.invalidate_cache")
|
layout.operator("arm.invalidate_cache")
|
||||||
elif obj.type == 'LAMP':
|
elif obj.type == 'LAMP':
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
|
|
|
@ -117,7 +117,6 @@ project.addSources('Sources');
|
||||||
if enable_dce:
|
if enable_dce:
|
||||||
f.write("project.addParameter('-dce full');\n")
|
f.write("project.addParameter('-dce full');\n")
|
||||||
|
|
||||||
import_traits.append('armory.trait.internal.JSScriptAPI')
|
|
||||||
import_traits = list(set(import_traits))
|
import_traits = list(set(import_traits))
|
||||||
for i in range(0, len(import_traits)):
|
for i in range(0, len(import_traits)):
|
||||||
f.write("project.addParameter('" + import_traits[i] + "');\n")
|
f.write("project.addParameter('" + import_traits[i] + "');\n")
|
||||||
|
|
|
@ -1,176 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright 2014-2015 Dario Manesku. All rights reserved.
|
|
||||||
# License: http://www.opensource.org/licenses/BSD-2-Clause
|
|
||||||
#
|
|
||||||
|
|
||||||
CMFT=./cmft-osx
|
|
||||||
|
|
||||||
# Prints help.
|
|
||||||
#eval $CMFT --help
|
|
||||||
|
|
||||||
# Use this to list available OpenCL devices that can be used with cmft for processing.
|
|
||||||
#eval $CMFT --printCLDevices
|
|
||||||
|
|
||||||
# Typical parameters for irradiance filter.
|
|
||||||
# eval $CMFT $@ --input "test.jpg" \
|
|
||||||
# --filter irradiance \
|
|
||||||
# --srcFaceSize 0 \
|
|
||||||
# --dstFaceSize 0 \
|
|
||||||
# --outputNum 1 \
|
|
||||||
# --output0 "test_irr" \
|
|
||||||
# --output0params hdr,rgbe,latlong
|
|
||||||
|
|
||||||
# Typical parameters for generating spherical harmonics coefficients.
|
|
||||||
eval $CMFT $@ --input "test.hdr" \
|
|
||||||
--filter shcoeffs \
|
|
||||||
--outputNum 1 \
|
|
||||||
--output0 "test"
|
|
||||||
|
|
||||||
# Typical parameters for radiance filter.
|
|
||||||
# eval $CMFT $@ --input "test.jpg" \
|
|
||||||
# ::Filter options \
|
|
||||||
# --filter radiance \
|
|
||||||
# --srcFaceSize 64 \
|
|
||||||
# --excludeBase false \
|
|
||||||
# --mipCount 7 \
|
|
||||||
# --glossScale 10 \
|
|
||||||
# --glossBias 3 \
|
|
||||||
# --lightingModel blinnbrdf \
|
|
||||||
# --edgeFixup none \
|
|
||||||
# --dstFaceSize 64 \
|
|
||||||
# ::Processing devices \
|
|
||||||
# --numCpuProcessingThreads 4 \
|
|
||||||
# --useOpenCL true \
|
|
||||||
# --clVendor anyGpuVendor \
|
|
||||||
# --deviceType gpu \
|
|
||||||
# --deviceIndex 0 \
|
|
||||||
# ::Aditional operations \
|
|
||||||
# --inputGammaNumerator 2.2 \
|
|
||||||
# --inputGammaDenominator 1.0 \
|
|
||||||
# --outputGammaNumerator 1.0 \
|
|
||||||
# --outputGammaDenominator 2.2 \
|
|
||||||
# --generateMipChain true \
|
|
||||||
# ::Output \
|
|
||||||
# --outputNum 1 \
|
|
||||||
# --output0 "envmap_rad" \
|
|
||||||
# --output0params hdr,rgbe,latlong \
|
|
||||||
# --output1 "okretnica_pmrem" \
|
|
||||||
# --output1params ktx,rgba8,cubemap
|
|
||||||
|
|
||||||
# Cmft can also be run without any processing filter. This can be used for performing image manipulations or exporting different image format.
|
|
||||||
#eval $CMFT $@ --input "okretnica.tga" \
|
|
||||||
# --filter none \
|
|
||||||
# ::Aditional operations \
|
|
||||||
# --inputGamma 1.0 \
|
|
||||||
# --inputGammaDenominator 1.0 \
|
|
||||||
# --outputGamma 1.0 \
|
|
||||||
# --outputGammaDenominator 1.0 \
|
|
||||||
# --generateMipChain true \
|
|
||||||
# ::Cubemap transformations \
|
|
||||||
# --posXrotate90 \
|
|
||||||
# --posXrotate180 \
|
|
||||||
# --posXrotate270 \
|
|
||||||
# --posXflipH \
|
|
||||||
# --posXflipV \
|
|
||||||
# --negXrotate90 \
|
|
||||||
# --negXrotate180 \
|
|
||||||
# --negXrotate270 \
|
|
||||||
# --negXflipH \
|
|
||||||
# --negXflipV \
|
|
||||||
# --posYrotate90 \
|
|
||||||
# --posYrotate180 \
|
|
||||||
# --posYrotate270 \
|
|
||||||
# --posYflipH \
|
|
||||||
# --posYflipV \
|
|
||||||
# --negYrotate90 \
|
|
||||||
# --negYrotate180 \
|
|
||||||
# --negYrotate270 \
|
|
||||||
# --negYflipH \
|
|
||||||
# --negYflipV \
|
|
||||||
# --posZrotate90 \
|
|
||||||
# --posZrotate180 \
|
|
||||||
# --posZrotate270 \
|
|
||||||
# --posZflipH \
|
|
||||||
# --posZflipV \
|
|
||||||
# --negZrotate90 \
|
|
||||||
# --negZrotate180 \
|
|
||||||
# --negZrotate270 \
|
|
||||||
# --negZflipH \
|
|
||||||
# --negZflipV \
|
|
||||||
# ::Output \
|
|
||||||
# --outputNum 1 \
|
|
||||||
# --output0 "okretnica_dds" \
|
|
||||||
# --output0params dds,bgra8,cubemap \
|
|
||||||
|
|
||||||
# Cmft with all parameters listed. This is mainly to have a look at what is all possible.
|
|
||||||
#eval $CMFT $@ --input "okretnica.tga" \
|
|
||||||
# ::Filter options \
|
|
||||||
# --filter radiance \
|
|
||||||
# --srcFaceSize 256 \
|
|
||||||
# --excludeBase false \
|
|
||||||
# --mipCount 7 \
|
|
||||||
# --glossScale 10 \
|
|
||||||
# --glossBias 3 \
|
|
||||||
# --lightingModel blinnbrdf \
|
|
||||||
# --edgeFixup none \
|
|
||||||
# --dstFaceSize 256 \
|
|
||||||
# ::Processing devices \
|
|
||||||
# --numCpuProcessingThreads 4 \
|
|
||||||
# --useOpenCL true \
|
|
||||||
# --clVendor anyGpuVendor \
|
|
||||||
# --deviceType gpu \
|
|
||||||
# --deviceIndex 0 \
|
|
||||||
# ::Aditional operations \
|
|
||||||
# --inputGamma 1.0 \
|
|
||||||
# --inputGammaDenominator 1.0 \
|
|
||||||
# --outputGamma 1.0 \
|
|
||||||
# --outputGammaDenominator 1.0 \
|
|
||||||
# --generateMipChain false \
|
|
||||||
# ::Cubemap transformations \
|
|
||||||
# --posXrotate90 \
|
|
||||||
# --posXrotate180 \
|
|
||||||
# --posXrotate270 \
|
|
||||||
# --posXflipH \
|
|
||||||
# --posXflipV \
|
|
||||||
# --negXrotate90 \
|
|
||||||
# --negXrotate180 \
|
|
||||||
# --negXrotate270 \
|
|
||||||
# --negXflipH \
|
|
||||||
# --negXflipV \
|
|
||||||
# --posYrotate90 \
|
|
||||||
# --posYrotate180 \
|
|
||||||
# --posYrotate270 \
|
|
||||||
# --posYflipH \
|
|
||||||
# --posYflipV \
|
|
||||||
# --negYrotate90 \
|
|
||||||
# --negYrotate180 \
|
|
||||||
# --negYrotate270 \
|
|
||||||
# --negYflipH \
|
|
||||||
# --negYflipV \
|
|
||||||
# --posZrotate90 \
|
|
||||||
# --posZrotate180 \
|
|
||||||
# --posZrotate270 \
|
|
||||||
# --posZflipH \
|
|
||||||
# --posZflipV \
|
|
||||||
# --negZrotate90 \
|
|
||||||
# --negZrotate180 \
|
|
||||||
# --negZrotate270 \
|
|
||||||
# --negZflipH \
|
|
||||||
# --negZflipV \
|
|
||||||
# ::Output \
|
|
||||||
# --outputNum 5 \
|
|
||||||
# --output0 "cmft_cubemap" --output0params dds,bgra8,cubemap \
|
|
||||||
# --output1 "cmft_hstrip" --output1params dds,bgra8,hstrip \
|
|
||||||
# --output2 "cmft_cubecross" --output2params ktx,rgba32f,hcross \
|
|
||||||
# --output3 "cmft_facelist" --output3params tga,bgra8,facelist \
|
|
||||||
# --output4 "cmft_latlong" --output4params hdr,rgbe,latlong
|
|
||||||
|
|
||||||
# eval $CMFT $@ --input "shrine.hdr" \
|
|
||||||
# --filter none \
|
|
||||||
# ::Output \
|
|
||||||
# --outputNum 1 \
|
|
||||||
# --dstFaceSize 0 \
|
|
||||||
# --output0 "test" \
|
|
||||||
# --output0params hdr,rgbe,latlong
|
|
|
@ -1,105 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Scene",
|
|
||||||
"renderpath_datas": [
|
|
||||||
{
|
|
||||||
"name": "simple_path",
|
|
||||||
"render_targets": [
|
|
||||||
{
|
|
||||||
"name": "sdf",
|
|
||||||
"width": 50,
|
|
||||||
"height": 2500,
|
|
||||||
"format": "A32"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stages": [
|
|
||||||
{
|
|
||||||
"command": "call_function",
|
|
||||||
"params": ["Main.begin"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "set_target",
|
|
||||||
"params": [
|
|
||||||
"1.0", "sdf"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "clear_target",
|
|
||||||
"params": [
|
|
||||||
"color", "#ff000000",
|
|
||||||
"depth", "1.0"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "draw_shader_quad",
|
|
||||||
"params": [
|
|
||||||
"Scene/sdfgen/sdfgen"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "call_function",
|
|
||||||
"params": ["Main.end"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"shader_datas": [
|
|
||||||
{
|
|
||||||
"contexts": [
|
|
||||||
{
|
|
||||||
"name": "sdfgen",
|
|
||||||
"compare_mode": "always",
|
|
||||||
"constants": [
|
|
||||||
{
|
|
||||||
"name": "meshverts",
|
|
||||||
"type": "int",
|
|
||||||
"link": "_meshverts"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cull_mode": "none",
|
|
||||||
"depth_write": false,
|
|
||||||
"fragment_shader": "sdfgen.frag",
|
|
||||||
"vertex_shader": "sdfgen.vert",
|
|
||||||
"texture_units": [
|
|
||||||
{
|
|
||||||
"name": "meshtex",
|
|
||||||
"link": "_meshtex"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"vertex_structure": [
|
|
||||||
{
|
|
||||||
"name": "pos",
|
|
||||||
"size": 2
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "sdfgen"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"camera_datas": [
|
|
||||||
{
|
|
||||||
"name": "CameraData",
|
|
||||||
"type": "perspective",
|
|
||||||
"near_plane": 0.1,
|
|
||||||
"far_plane": 100.0,
|
|
||||||
"fov": 0.85,
|
|
||||||
"render_path": "simple_path"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"camera_ref": "Camera",
|
|
||||||
"objects": [
|
|
||||||
{
|
|
||||||
"name": "Camera",
|
|
||||||
"type": "camera_object",
|
|
||||||
"data_ref": "CameraData",
|
|
||||||
"transform": {
|
|
||||||
"values": [
|
|
||||||
0.6859206557273865,-0.32401347160339355,0.6515582203865051,7.481131553649902,
|
|
||||||
0.7276763319969177,0.305420845746994,-0.6141703724861145,-6.5076398849487305,
|
|
||||||
0.0,0.8953956365585327,0.44527140259742737,5.34366512298584,
|
|
||||||
0.0,0.0,0.0,1.0
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue