Evaluate mesh with modifiers after the depsgraph related API changes

Hello. I am curious if it is still somwhow possible to evaluate modifiers for a mesh without evaluating drivers and animation. It used to be possible before as there was a specific feature for it. I am wondering if it is still available along with full depsgraph evaluation. It is very important for custom export addons since we want to export the animation data by manually reading curves values usually.

I’m not sure which specific feature you are referring to? Drivers and animation also affected mesh evaluation beforehand, Blender does not define a non-animated value of properties. The value of the property in the original mesh gets overwritten by the animation or driver.

What you can do is make some changes to the scene to disable f-curves and drivers, update the depsgraph, export and then undo the changes. But the values in the original objects will still be the ones from the last frame where animation was evaluated.

I am referring to bpy.types.Object.to_mesh( scene , apply_modifiers , settings , calc_tessface=True , calc_undeformed=False )

As far as I am aware, that was able to produce a mesh with modifiers applied as of 2.79, but it was not affected by animation.

That was also affected by animation, because there is no such thing as non-animated property values in Blender.

What that function didn’t do was automatically update animation for the current frame. But it would still have the values from the last frame where animation was evaluated. So there could be a difference if you changed the frame without a scene update, but it’s unclear what the purpose of that would be.

The purpose is to export the model in a T-pose (if we are talking about character models) and then export the rest of the animation data for it manually by reading the curves.

You can check how the FBX exporter does it. It puts the armature in the rest pose and updates the dependency graph, then restores it again.

1 Like