Defines to lower-case.

This commit is contained in:
Lubos Lenco 2016-10-12 18:26:56 +02:00
parent 85ea9845f2
commit 0fef65aa5f
12 changed files with 32 additions and 32 deletions

View file

@ -9,7 +9,7 @@ import armory.trait.internal.CameraController;
@:keep
class FirstPersonController extends CameraController {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else

View file

@ -14,7 +14,7 @@ import armory.system.Keymap;
@:keep
class GunController extends Trait {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else

View file

@ -4,14 +4,14 @@ import iron.Trait;
import iron.system.Input;
import armory.trait.internal.RigidBody;
import armory.trait.internal.PhysicsWorld;
#if WITH_PHYSICS
#if arm_physics
import haxebullet.Bullet;
#end
@:keep
class PhysicsDrag extends Trait {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else

View file

@ -6,7 +6,7 @@ import armory.trait.internal.CameraController;
@:keep
class SidescrollerController extends CameraController {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else

View file

@ -8,7 +8,7 @@ import armory.trait.internal.CameraController;
@:keep
class ThirdPersonController extends CameraController {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else

View file

@ -7,14 +7,14 @@ import iron.object.Transform;
import iron.system.Time;
import armory.trait.internal.PhysicsWorld;
import armory.system.Keymap;
#if WITH_PHYSICS
#if arm_physics
import haxebullet.Bullet;
#end
@:keep
class VehicleBody extends Trait {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else
@ -246,7 +246,7 @@ class VehicleBody extends Trait {
class VehicleWheel {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { }
#else

View file

@ -9,7 +9,7 @@ import armory.system.Keymap;
@:keep
class CameraController extends Trait {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else

View file

@ -1,7 +1,7 @@
package armory.trait.internal;
import iron.Trait;
#if WITH_PROFILE
#if arm_profile
import kha.Scheduler;
import iron.data.RenderPath;
import iron.object.CameraObject;
@ -12,7 +12,7 @@ import zui.Id;
@:keep
class Console extends Trait {
#if (!WITH_PROFILE)
#if (!arm_profile)
public function new() { super(); }
#else
@ -96,7 +96,7 @@ class Console extends Trait {
g.begin(false);
#if WITH_PROFILE
#if arm_profile
totalTime += frameTime;
renderTime += iron.App.renderTime;
frames++;
@ -125,9 +125,9 @@ class Console extends Trait {
}
function update() {
#if WITH_PROFILE
#if arm_profile
updateTime += iron.App.updateTime;
#if WITH_PHYSICS
#if arm_physics
physTime += PhysicsWorld.physTime;
#end
#end

View file

@ -1,6 +1,6 @@
package armory.trait.internal;
#if WITH_PHYSICS
#if arm_physics
import haxebullet.Bullet;
#end
import iron.Trait;
@ -20,10 +20,10 @@ class ContactPair {
@:keep
class PhysicsWorld extends Trait {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else
#if WITH_PROFILE
#if arm_profile
public static var physTime = 0.0;
#end
@ -114,7 +114,7 @@ class PhysicsWorld extends Trait {
}
public function update() {
#if WITH_PROFILE
#if arm_profile
var startTime = kha.Scheduler.realTime();
#end
@ -123,7 +123,7 @@ class PhysicsWorld extends Trait {
world.ptr.stepSimulation(timeStep, 1, fixedStep);
updateContacts();
#if WITH_PROFILE
#if arm_profile
physTime = kha.Scheduler.realTime() - startTime;
#end
}

View file

@ -1,6 +1,6 @@
package armory.trait.internal;
#if WITH_PHYSICS
#if arm_physics
import haxebullet.Bullet;
#end
import iron.Trait;
@ -12,7 +12,7 @@ import iron.object.MeshObject;
@:keep
class RigidBody extends Trait {
#if (!WITH_PHYSICS)
#if (!arm_physics)
public function new() { super(); }
#else

View file

@ -734,11 +734,11 @@ def traverse_renderpath(node, node_group, render_targets, depth_buffers):
# Gather defs from linked nodes
if node.bl_idname == 'TAAPassNodeType' or node.bl_idname == 'MotionBlurVelocityPassNodeType' or node.bl_idname == 'SSAOReprojectPassNodeType':
if preprocess_renderpath.velocity_def_added == False:
assets.add_khafile_def('WITH_VELOC')
assets.add_khafile_def('arm_veloc')
bpy.data.worlds['Arm'].world_defs += '_Veloc'
preprocess_renderpath.velocity_def_added = True
if node.bl_idname == 'TAAPassNodeType':
assets.add_khafile_def('WITH_TAA')
assets.add_khafile_def('arm_taa')
# bpy.data.worlds['Arm'].world_defs += '_TAA'
elif node.bl_idname == 'SMAAPassNodeType':
bpy.data.worlds['Arm'].world_defs += '_SMAA'
@ -748,7 +748,7 @@ def traverse_renderpath(node, node_group, render_targets, depth_buffers):
bpy.data.worlds['Arm'].world_defs += '_SSAO'
elif node.bl_idname == 'DrawStereoNodeType':
assets.add_khafile_def('WITH_VR')
assets.add_khafile_def('arm_vr')
bpy.data.worlds['Arm'].world_defs += '_VR'
# Collect render targets

View file

@ -29,7 +29,7 @@ project.addSources('Sources');
f.write(add_armory_library(sdk_path, 'iron'))
if export_physics:
f.write("project.addDefine('WITH_PHYSICS');\n")
f.write("project.addDefine('arm_physics');\n")
f.write(add_armory_library(sdk_path + '/lib/', 'haxebullet'))
if dce_full:
@ -37,7 +37,7 @@ project.addSources('Sources');
# Electron live patching
# if is_play and wrd.ArmPlayLivePatch == True and wrd.ArmPlayRuntime == 'Electron':
# f.write("project.addDefine('WITH_PATCH_ELECTRON');\n")
# f.write("project.addDefine('arm_patch_electron');\n")
# Native scripting
# f.write(add_armory_library(sdk_path + '/lib/', 'haxeduktape'))
@ -54,7 +54,7 @@ project.addSources('Sources');
f.write("project.addAssets('" + ref + "');\n")
if wrd.ArmPlayConsole:
f.write("project.addDefine('WITH_PROFILE');\n")
f.write("project.addDefine('arm_profile');\n")
f.write(add_armory_library(sdk_path, 'lib/zui'))
font_path = sdk_path + '/armory/Assets/droid_sans.ttf'
font_path = font_path.replace('\\', '/')
@ -65,13 +65,13 @@ project.addSources('Sources');
# f.write(add_armory_library(sdk_path, 'lib/haxeui/hscript'))
if wrd.ArmMinimize == False:
f.write("project.addDefine('WITH_JSON');\n")
f.write("project.addDefine('arm_json');\n")
if wrd.ArmDeinterleavedBuffers == True:
f.write("project.addDefine('WITH_DEINTERLEAVED');\n")
f.write("project.addDefine('arm_deinterleaved');\n")
if wrd.generate_gpu_skin == False:
f.write("project.addDefine('WITH_CPU_SKIN');\n")
f.write("project.addDefine('arm_cpu_skin');\n")
for d in assets.khafile_defs:
f.write("project.addDefine('" + d + "');\n")
@ -102,7 +102,7 @@ class Main {
iron.system.CompileTime.importPackage('armory.trait');
iron.system.CompileTime.importPackage('armory.renderpath');
iron.system.CompileTime.importPackage('""" + wrd.ArmProjectPackage + """');
#if (js && WITH_PHYSICS)
#if (js && arm_physics)
untyped __js__("
function loadScript(url, callback) {
var head = document.getElementsByTagName('head')[0];