Depsgraph: Remove confusing metaball logic

DATA datablock must evaluation must never depend on object it is
used for. If there is something what depends on an object, it must
be done on object level.

At least the actual callback was empty.
This commit is contained in:
Sergey Sharybin 2018-06-06 09:54:58 +02:00
parent 9f255db4fe
commit 180e8f8bfb
3 changed files with 6 additions and 30 deletions

View File

@ -76,8 +76,6 @@ void BKE_mball_select_swap(struct MetaBall *mb);
struct Depsgraph;
void BKE_mball_eval_geometry(struct Depsgraph *depsgraph,
struct MetaBall *mball);
/* Draw Cache */
enum {

View File

@ -563,11 +563,6 @@ void BKE_mball_select_swap(struct MetaBall *mb)
/* **** Depsgraph evaluation **** */
void BKE_mball_eval_geometry(struct Depsgraph *UNUSED(depsgraph),
MetaBall *UNUSED(mball))
{
}
/* Draw Engine */
void (*BKE_mball_batch_cache_dirty_cb)(MetaBall *mb, int mode) = NULL;

View File

@ -1077,29 +1077,12 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *object)
case OB_MBALL:
{
Object *mom = BKE_mball_basis_find(scene_, object);
/* NOTE: Only the motherball gets evaluated, it's children are
* having empty placeholders for the correct relations being built.
*/
if (mom == object) {
/* metaball evaluation operations */
op_node = add_operation_node(obdata,
DEG_NODE_TYPE_GEOMETRY,
function_bind(
BKE_mball_eval_geometry,
_1,
(MetaBall *)obdata_cow),
DEG_OPCODE_PLACEHOLDER,
"Geometry Eval");
}
else {
op_node = add_operation_node(obdata,
DEG_NODE_TYPE_GEOMETRY,
NULL,
DEG_OPCODE_PLACEHOLDER,
"Geometry Eval");
op_node->set_as_entry();
}
op_node = add_operation_node(obdata,
DEG_NODE_TYPE_GEOMETRY,
NULL,
DEG_OPCODE_PLACEHOLDER,
"Geometry Eval");
op_node->set_as_entry();
break;
}