Recache on shading change
This commit is contained in:
parent
a7634abf25
commit
e8812d3303
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue