Improve dce
This commit is contained in:
parent
563ec2eb44
commit
9c6e6eb462
|
@ -1,3 +0,0 @@
|
|||
package armory;
|
||||
|
||||
typedef Scene = iron.Scene;
|
|
@ -1,3 +0,0 @@
|
|||
package armory;
|
||||
|
||||
typedef Trait = iron.Trait;
|
File diff suppressed because one or more lines are too long
|
@ -156,8 +156,9 @@ class Uniforms {
|
|||
v.z = armory.renderpath.HosekWilkie.data.Z.z;
|
||||
}
|
||||
}
|
||||
else if (link == "_cameraPositionSnap") {
|
||||
#if arm_voxelgi
|
||||
#end
|
||||
#if arm_voxelgi
|
||||
if (link == "_cameraPositionSnap") {
|
||||
v = iron.object.Uniforms.helpVec;
|
||||
var camera = iron.Scene.active.camera;
|
||||
v.set(camera.transform.worldx(), camera.transform.worldy(), camera.transform.worldz());
|
||||
|
@ -167,9 +168,9 @@ class Uniforms {
|
|||
v.y += l.y * e * 0.9;
|
||||
var f = Main.voxelgiVoxelSize * 8; // Snaps to 3 mip-maps range
|
||||
v.set(Math.floor(v.x / f) * f, Math.floor(v.y / f) * f, Math.floor(v.z / f) * f);
|
||||
#end
|
||||
}
|
||||
#end
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
package armory.system;
|
||||
|
||||
typedef Input = iron.system.Input;
|
|
@ -19,7 +19,7 @@ class FirstPersonController extends CameraController {
|
|||
public function new() {
|
||||
super();
|
||||
|
||||
armory.Scene.active.notifyOnInit(init);
|
||||
iron.Scene.active.notifyOnInit(init);
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
|
|
@ -122,7 +122,7 @@ class VehicleBody extends Trait {
|
|||
function update() {
|
||||
if (vehicle == null) return;
|
||||
|
||||
var keyboard = armory.system.Input.getKeyboard();
|
||||
var keyboard = iron.system.Input.getKeyboard();
|
||||
var forward = keyboard.down(keyUp);
|
||||
var backward = keyboard.down(keyDown);
|
||||
var left = keyboard.down(keyLeft);
|
||||
|
|
|
@ -25,7 +25,7 @@ class CameraController extends Trait {
|
|||
public function new() {
|
||||
super();
|
||||
|
||||
Scene.active.notifyOnInit(function() {
|
||||
iron.Scene.active.notifyOnInit(function() {
|
||||
transform = object.transform;
|
||||
body = object.getTrait(RigidBody);
|
||||
camera = cast(object.getChildOfType(CameraObject), CameraObject);
|
||||
|
|
|
@ -2,7 +2,7 @@ package armory.trait.physics;
|
|||
|
||||
#if (!arm_physics)
|
||||
|
||||
class RigidBody extends Trait { public function new() { super(); } }
|
||||
class RigidBody extends iron.Trait { public function new() { super(); } }
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -3,12 +3,11 @@ package armory.trait.physics.bullet;
|
|||
#if arm_bullet
|
||||
|
||||
import haxebullet.Bullet;
|
||||
import iron.Trait;
|
||||
import iron.math.Vec4;
|
||||
import iron.object.Transform;
|
||||
import iron.object.MeshObject;
|
||||
|
||||
class RigidBody extends Trait {
|
||||
class RigidBody extends iron.Trait {
|
||||
|
||||
var shape:Shape;
|
||||
var _motionState:BtMotionStatePointer;
|
||||
|
|
|
@ -161,8 +161,10 @@ def build():
|
|||
assets.add(assets_path + 'noise256.png')
|
||||
assets.add_embedded_data('noise256.png')
|
||||
|
||||
if not rpdat.rp_render_to_texture or not rpdat.rp_compositornodes:
|
||||
assets.add_shader_pass('copy_pass')
|
||||
if rpdat.rp_renderer == 'Deferred' and not rpdat.rp_compositornodes:
|
||||
assets.add_shader_pass('copy_pass')
|
||||
if rpdat.rp_renderer == 'Forward' and not rpdat.rp_compositornodes and rpdat.rp_render_to_texture:
|
||||
assets.add_shader_pass('copy_pass')
|
||||
|
||||
if rpdat.rp_render_to_texture:
|
||||
assets.add_khafile_def('rp_render_to_texture')
|
||||
|
|
|
@ -604,7 +604,7 @@ class ArmRPListItem(bpy.types.PropertyGroup):
|
|||
items=[('GPU (Dual-Quat)', 'GPU (Dual-Quat)', 'GPU (Dual-Quat)'),
|
||||
('GPU (Matrix)', 'GPU (Matrix)', 'GPU (Matrix)'),
|
||||
('CPU', 'CPU', 'CPU'),
|
||||
('GPU Off', 'Off', 'Off')],
|
||||
('Off', 'Off', 'Off')],
|
||||
name='Skinning', description='Skinning method', default='GPU (Dual-Quat)', update=assets.invalidate_shader_cache)
|
||||
arm_skin_max_bones_auto = BoolProperty(name="Auto Bones", description="Calculate amount of maximum bones based on armatures", default=True, update=assets.invalidate_compiled_data)
|
||||
arm_skin_max_bones = IntProperty(name="Max Bones", default=50, min=1, max=3000, update=assets.invalidate_shader_cache)
|
||||
|
|
|
@ -107,6 +107,8 @@ project.addSources('Sources');
|
|||
|
||||
if is_publish:
|
||||
assets.add_khafile_def('arm_published')
|
||||
if wrd.arm_asset_compression:
|
||||
assets.add_khafile_def('arm_compress')
|
||||
else:
|
||||
pass
|
||||
# f.write("""project.addParameter("--macro include('armory.trait')");\n""")
|
||||
|
@ -215,8 +217,8 @@ project.addSources('Sources');
|
|||
assets.add_khafile_def('arm_skin_cpu')
|
||||
elif rpdat.arm_skin == 'GPU (Matrix)':
|
||||
assets.add_khafile_def('arm_skin_mat')
|
||||
elif rpdat.arm_skin == 'GPU Off':
|
||||
assets.add_khafile_def('arm_skin_off')
|
||||
if rpdat.arm_skin != 'Off':
|
||||
assets.add_khafile_def('arm_skin')
|
||||
|
||||
if arm.utils.get_viewport_controls() == 'azerty':
|
||||
assets.add_khafile_def('arm_azerty')
|
||||
|
@ -322,6 +324,9 @@ class Main {
|
|||
|
||||
f.write("""
|
||||
public static function main() {
|
||||
""")
|
||||
if rpdat.arm_skin != 'Off':
|
||||
f.write("""
|
||||
iron.object.BoneAnimation.skinMaxBones = """ + str(rpdat.arm_skin_max_bones) + """;
|
||||
""")
|
||||
if rpdat.rp_shadowmap_cascades != '1':
|
||||
|
|
Loading…
Reference in a new issue