Depsgraph: Fix assert failure on Cycles render
Was happening when there was material in bmain but not used by any object.
This commit is contained in:
parent
17dcdbcf16
commit
6bb7a4cdf2
|
@ -104,8 +104,16 @@ Object *DEG_get_evaluated_object(Depsgraph *depsgraph, Object *object)
|
|||
|
||||
ID *DEG_get_evaluated_id(struct Depsgraph *depsgraph, ID *id)
|
||||
{
|
||||
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph);
|
||||
return deg_graph->get_cow_id(id);
|
||||
/* TODO(sergey): This is a duplicate of Depsgraph::get_cow_id(),
|
||||
* but here we never do assert, since we don't know nature of the
|
||||
* incoming ID datablock.
|
||||
*/
|
||||
DEG::Depsgraph *deg_graph = (DEG::Depsgraph *)depsgraph;
|
||||
DEG::IDDepsNode *id_node = deg_graph->find_id_node(id);
|
||||
if (id_node == NULL) {
|
||||
return id;
|
||||
}
|
||||
return id_node->id_cow;
|
||||
}
|
||||
|
||||
/* ************************ DAG ITERATORS ********************* */
|
||||
|
|
Loading…
Reference in New Issue