Ensure image file exists

This commit is contained in:
Lubos Lenco 2017-01-12 12:11:25 +01:00
parent 3db0ef3700
commit 421b232823
5 changed files with 8 additions and 10 deletions

View File

@ -7,7 +7,7 @@ Note: The engine is still in development and will not work yet.
Once ready, a single download SDK will be provided, as well as steps to
setup project using git.
[Web](http://armory3d.org) - [Manual](http://armory3d.org/manual/)
[armory3d.org](http://armory3d.org) - [Manual](http://armory3d.org/manual/) - [Forums](http://forums.armory3d.org)
![](http://armory3d.org/git/img1.jpg)
![](http://armory3d.org/git/img2.jpg)

View File

@ -33,11 +33,7 @@ class SoftBody extends Trait {
this.mass = mass;
this.margin = margin;
iron.system.Tween.timer(3, function() {
notifyOnInit(init);
});
// notifyOnInit(init);
notifyOnInit(init);
}
function init() {
@ -97,7 +93,7 @@ class SoftBody extends Trait {
#end
softBody.ptr.setTotalMass(mass, false);
softBody.ptr.getCollisionShape().setMargin(0.2);
softBody.ptr.getCollisionShape().setMargin(margin);
physics.world.ptr.addSoftBody(softBody, 1, -1);
softBody.ptr.setActivationState(4);

View File

@ -2736,6 +2736,7 @@ class ArmoryExporter:
soft_mod = m
break
if soft_type >= 0:
ArmoryExporter.export_physics = True
assets.add_khafile_def('arm_physics_soft')
cloth_trait = {}
cloth_trait['type'] = 'Script'

View File

@ -41,6 +41,7 @@ def is_transluc(material):
return is_transluc_traverse(surface_node)
def is_transluc_traverse(node):
# TODO: traverse groups
if is_transluc_type(node):
return True
for inp in node.inputs:

View File

@ -55,9 +55,9 @@ def make_texture(image_node, tex_name):
assets.add(unpack_filepath)
else:
# if not os.path.isfile(image.filepath):
# log.warn(matname + '/' + image.name + ' - file not found')
# return tex
if not os.path.isfile(image.filepath):
log.warn(matname + '/' + image.name + ' - file not found')
return None
if do_convert:
converted_path = armutils.get_fp() + '/build/compiled/Assets/unpacked/' + tex['file']