[Bf-committers] Maybe to simple question

Tobias Oelgarte tobias.oelgarte at googlemail.com
Sat Oct 9 00:14:48 CEST 2010

I guess you misunderstood me a little. I try to write a modifier that 
keeps the volume of an closed mesh object, after other deform modifiers 
have been applied. Therefore it moves the vertices outward or inward 
until the original volume (before the effect of any other modifier) is 
restored. For example you can model a muscle, deform it with an armature 
(modifier)  and  ensure that its volume has not changed. If it's 
stretched it gets thinner and also the reverse case.

The modifier itself does not depend completely on the original mesh 
data, it only uses it to compute the volume. After that it modifies the 
derived mesh, like simple deform does. The only thing i'm looking for 
is: How can i access (read only) the data of the original mesh, if i 
only have a pointer to the object?

Campbell Barton schrieb:
> On Fri, Oct 8, 2010 at 9:23 PM, Tobias Oelgarte
> <tobias.oelgarte at googlemail.com> wrote:
>> Hi,
>> Im wondering how i can access the meshdata from an object pointer
>> (Object*), since i can remind that meshdata is stored separate from
>> objects. Currently i'm writing a modifier that needs the original mesh
>> data (before first modifier is applied) for a computation. So i can't
>> use the DerivedMesh* passed to the functions.
>> Currently i try to understand the code, but it will take i while, since
>> my sense of orientation is somehow missing at this point. ;-)
>> Greetings Tobias Oelgarte
> In general its good avoid doing this, but this is currently used by
> fluidsim & softbody:
>  eModifierTypeFlag_RequiresOriginalData
> For a reference of places to edit, render branch has the warp modifier
> which is fairly recent, for a diff do...
> svn diff -r29500:29501
> https://svn.blender.org/svnroot/bf-blender/branches/render25 >
> warp.diff

More information about the Bf-committers mailing list