Depsgraph: Add placeholder function to handle objects update

This way @dfelinto can do some special trickery in there.
This commit is contained in:
Sergey Sharybin
2017-01-26 17:24:57 +01:00
parent 5ef2f21963
commit 9023abbf27
3 changed files with 8 additions and 2 deletions

View File

@@ -206,6 +206,7 @@ void BKE_object_eval_uber_transform(struct EvaluationContext *eval_ctx,
void BKE_object_eval_uber_data(struct EvaluationContext *eval_ctx,
struct Scene *scene,
struct Object *ob);
void BKE_object_eval_shading(struct EvaluationContext *eval_ctx, struct Object *ob);
void BKE_object_handle_data_update(struct EvaluationContext *eval_ctx,
struct Scene *scene,

View File

@@ -343,3 +343,8 @@ void BKE_object_eval_uber_data(EvaluationContext *eval_ctx,
ob->recalc &= ~(OB_RECALC_DATA | OB_RECALC_TIME);
}
void BKE_object_eval_shading(EvaluationContext *UNUSED(eval_ctx), Object *ob)
{
DEBUG_PRINT("%s on %s\n", __func__, ob->id.name);
}

View File

@@ -834,8 +834,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
add_operation_node(&ob->id,
DEPSNODE_TYPE_SHADING,
DEPSOP_TYPE_EXEC,
NULL,
DEG_OPCODE_PLACEHOLDER, "Material Update");
function_bind(BKE_object_eval_shading, _1, ob),
DEG_OPCODE_OPERATION, "Material Update");
}
/* geometry collision */