From 48524d6e9122c323a43ef9fc8ba30b20e101308c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Nov 2010 04:26:50 +0000 Subject: fix [#24780] Metaballs are not drawn correctly in new scenes this is a can of worms, at the moment blender depends on broken behavior for metaballs: find_basis_mball() can return a metaball object that fails a is_basis_mball() check which makes this logic very confusing (added note about this in mball.c). Metaballs needs a refactor however at least make drawing fail consistently, For wire draw is_basis_mball() wasn't being checked, for solid drawing it was (hence the strange wire frame). For now the motherball needs to exist in the main scene else it wont work. --- source/blender/blenkernel/intern/mball.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/blenkernel/intern/mball.c') diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index a31a16ba606..94ffaaea947 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -309,6 +309,19 @@ float *make_orco_mball(Object *ob, ListBase *dispbase) return orcodata; } + +/* Note on mball basis stuff 2.5x (this is a can of worms) + * This really needs a rewrite/refactorm its totally broken in anything other then basic cases + * Multiple Scenes + Set Scenes & mixing mball basis SHOULD work but fails to update the depsgraph on rename + * and linking into scenes or removal of basis mball. so take care when changing this code. + * + * Main idiot thing here is that the system returns find_basis_mball() objects which fail a is_basis_mball() test. + * + * Not only that but the depsgraph and ther areas depend on this behavior!, so making small fixes here isnt worth it. + * - campbell + */ + + /** \brief Test, if Object *ob is basic MetaBall. * * It test last character of Object ID name. If last character @@ -385,6 +398,8 @@ void copy_mball_properties(Scene *scene, Object *active_object) * its name. All MetaBalls with same base of name can be * blended. MetaBalls with different basic name can't be * blended. + * + * warning!, is_basis_mball() can fail on returned object, see long note above. */ Object *find_basis_mball(Scene *scene, Object *basis) { -- cgit v1.2.3