[Bf-committers] Accessing post-modifier datablocks

Campbell Barton ideasman42 at gmail.com
Fri Sep 24 17:14:03 CEST 2010

On Fri, Sep 24, 2010 at 1:48 PM, Tom Edwards <t_edwards at btinternet.com> wrote:
>  I'm writing an export script, and since the target format does not
> support an object/data model I need what I export to match what is
> displayed on-screen. My problem is that datablocks provide incomplete
> data, as object settings like transformation and modifiers are naturally
> not applied to them.
> I've been able to bake object transformations, but applying modifiers
> fails if a mesh object has shape keys (as my script's often do). The
> message is "Modifier cannot be applied to Mesh with Shape Keys", and I
> can't think of a way around it.
> Blender needs to properly support exporting to simple formats, and the
> data needed exists: I can see it in the 3D View. An accessor is called
> for, something like object.data_modified, to a read-only datablock
> instance scaled, rotated, mirrored etc. to be as it appears to the user.
> Thanks.

Excuse the brief reply,
Example Usage: ./release/scripts/op/io_mesh_ply/export_ply.py:55:
  mesh = obj.create_mesh(scene, True, 'PREVIEW')

More information about the Bf-committers mailing list