Recache on apply transform

This commit is contained in:
Lubos Lenco 2017-01-03 13:20:33 +01:00
parent 27f7e1e405
commit a4e9a8b34d

View file

@ -126,6 +126,10 @@ def on_scene_update_post(context):
# 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':
obj.data.mesh_cached = False
if obj.active_material != None and obj.active_material.is_updated:
obj.active_material.is_cached = False