[Bf-committers] Modifier stack refactor

Ben Batt benbatt at gmail.com
Tue Jun 24 15:17:02 CEST 2008


Hi again,
Thanks for the input, everyone. It looks like it'd be better to wait
until after 2.47 and then commit to trunk, since it's kind of a pain
to merge changes from modifier.c to individual modifier files (I know,
I've been doing it :-) ). I'm tracking it in git here, so I should be
able to keep it up to date with trunk ok.

On Tue, Jun 24, 2008 at 10:45 AM, André Pinto
<andresusanopinto at gmail.com> wrote:
> When working on my SoC project I had to look on modifiers and
> definitely they needed a refactor like the one proposed :)

Yeah, it's been due for a while :-)

> Where do headers related with modifiers go?
> blender/source/blender/modifiers/MOD_modifiername.h?
> In that case it seems you forgot to refactor headers like BKE_cloth.h,
> BKE_softbody.h, BKE_subsurf.h

Headers aren't needed for the individual modifiers, as the interface
for each modifier is defined in a ModifierTypeInfo structure in the
MOD_modifiername.c file. These structures are declared extern in
blender/source/blender/modifiers/MOD_modifiertypes.h so that the
modifier stack can access them. This is very similar to the way the
nodes API works.

> Also I remind you some modifiers were already "separated" from
> modifier.c which is the case of:
> cloth.c, softbody.c (maybe there are more)
> and probably that code should also move to blender/source/blender/modifiers/
> (Although I don't know blender code well.. and not sure if those files
> are only modifier related)

Yes, these could possibly be moved over as well, I need to look into
that a bit further.

Thanks,
Ben


More information about the Bf-committers mailing list