From e8812d3303957284cf3785019dfc2a8358243803 Mon Sep 17 00:00:00 2001 From: Lubos Lenco Date: Tue, 7 Feb 2017 14:47:03 +0100 Subject: [PATCH] Recache on shading change --- README.md | 7 ++----- blender/handlers.py | 11 ++++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 225dd881..e306202f 100755 --- a/README.md +++ b/README.md @@ -3,11 +3,8 @@ armory [![Build Status](https://travis-ci.org/armory3d/armory.svg?branch=master)](https://travis-ci.org/armory3d/armory) -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. - [armory3d.org](http://armory3d.org) - [Manual](http://armory3d.org/manual/) - [Forums](http://forums.armory3d.org) +In development! Armory is a real-time 3D engine aimed at creation of 3D games and applications - featuring full Blender integration, state of art rendering and ultra portability. The engine is currently available in a form of [early preview](http://armory3d.org/download.html). + ![](http://armory3d.org/git/img1.jpg) -![](http://armory3d.org/git/img2.jpg) diff --git a/blender/handlers.py b/blender/handlers.py index bb05a4fb..1d6ccf7e 100644 --- a/blender/handlers.py +++ b/blender/handlers.py @@ -123,11 +123,12 @@ def on_scene_update_post(context): obj = bpy.context.object if obj != None: if operators_changed: - # Modifier was added/removed, recache mesh - if ops[-1].bl_idname == 'OBJECT_OT_modifier_add' or ops[-1].bl_idname == 'OBJECT_OT_modifier_remove': - obj.data.mesh_cached = False - # Apply transform - elif ops[-1].bl_idname == 'OBJECT_OT_transform_apply': + # Recache mesh data + if ops[-1].bl_idname == 'OBJECT_OT_modifier_add' or \ + ops[-1].bl_idname == 'OBJECT_OT_modifier_remove' or \ + ops[-1].bl_idname == 'OBJECT_OT_transform_apply' or \ + ops[-1].bl_idname == 'OBJECT_OT_shade_smooth' or \ + ops[-1].bl_idname == 'OBJECT_OT_shade_flat': obj.data.mesh_cached = False if obj.active_material != None and obj.active_material.is_updated: