forked from bartvdbraak/blender
Bugfix: Fix crashes with empty material slots
This commit is contained in:
parent
d58cb1beaa
commit
6a2a424c40
@ -622,8 +622,10 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
|
||||
for (a = 1; a <= ob->totcol; a++) {
|
||||
Material *ma = give_current_material(ob, a);
|
||||
|
||||
/* recursively figure out if there are drivers, and hook these up to this object */
|
||||
dag_add_material_driver_relations(dag, node, ma);
|
||||
if (ma) {
|
||||
/* recursively figure out if there are drivers, and hook these up to this object */
|
||||
dag_add_material_driver_relations(dag, node, ma);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2607,8 +2607,10 @@ void BKE_object_handle_update(Scene *scene, Object *ob)
|
||||
for (a = 1; a <= ob->totcol; a++) {
|
||||
Material *ma = give_current_material(ob, a);
|
||||
|
||||
/* recursively update drivers for this material */
|
||||
material_drivers_update(scene, ma, ctime);
|
||||
if (ma) {
|
||||
/* recursively update drivers for this material */
|
||||
material_drivers_update(scene, ma, ctime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user