Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-18 07:26:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-18 07:26:50 +0300
commit48524d6e9122c323a43ef9fc8ba30b20e101308c (patch)
tree9a05b65772fe59ffbc38283e1397f2ecbf8c7453 /source/blender/blenkernel/intern/mball.c
parent7045ef617fa097e6f9a7919f36c5a494ce046a7b (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/mball.c')
-rw-r--r--source/blender/blenkernel/intern/mball.c15
1 files changed, 15 insertions, 0 deletions
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)
{