diff --git a/QRemeshify/operator.py b/QRemeshify/operator.py index 7a99af0..abe9dba 100644 --- a/QRemeshify/operator.py +++ b/QRemeshify/operator.py @@ -46,8 +46,10 @@ def execute(self, ctx): # Load lib qw = Quadwild(mesh_filepath) + hasCache = props.useCache and os.path.exists(qw.traced_path) + try: - if not props.useCache: + if not hasCache: # Get mesh after modifiers and shapekeys applied depsgraph = bpy.context.evaluated_depsgraph_get() evaluated_obj = obj.evaluated_get(depsgraph) @@ -178,7 +180,7 @@ def execute(self, ctx): # Cleanup del qw - if not props.useCache: + if not hasCache: bm.free() del bm evaluated_obj.to_mesh_clear()