From 421b23282346f8d28fc697c4987c0b256c7af6de Mon Sep 17 00:00:00 2001 From: Lubos Lenco Date: Thu, 12 Jan 2017 12:11:25 +0100 Subject: [PATCH] Ensure image file exists --- README.md | 2 +- Sources/armory/trait/internal/SoftBody.hx | 8 ++------ blender/exporter.py | 1 + blender/material/mat_utils.py | 1 + blender/material/texture.py | 6 +++--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f2af77e0..225dd881 100755 --- a/README.md +++ b/README.md @@ -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) diff --git a/Sources/armory/trait/internal/SoftBody.hx b/Sources/armory/trait/internal/SoftBody.hx index d845d648..f08faf04 100644 --- a/Sources/armory/trait/internal/SoftBody.hx +++ b/Sources/armory/trait/internal/SoftBody.hx @@ -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); diff --git a/blender/exporter.py b/blender/exporter.py index 525c8f2d..bba0ca59 100755 --- a/blender/exporter.py +++ b/blender/exporter.py @@ -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' diff --git a/blender/material/mat_utils.py b/blender/material/mat_utils.py index c5f09fd0..6ac6310d 100644 --- a/blender/material/mat_utils.py +++ b/blender/material/mat_utils.py @@ -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: diff --git a/blender/material/texture.py b/blender/material/texture.py index 73192404..38595590 100644 --- a/blender/material/texture.py +++ b/blender/material/texture.py @@ -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']