Nodes: fix material node copied over when socket is copied
This was missing from rB207472930834a2916cf18bbdff51bcd77c6dd0c0.
This commit is contained in:
parent
223c6e1ead
commit
2ad3a1c318
|
@ -37,6 +37,7 @@
|
|||
#include "BKE_node.h"
|
||||
|
||||
#include "DNA_collection_types.h"
|
||||
#include "DNA_material_types.h"
|
||||
|
||||
#include "RNA_access.h"
|
||||
#include "RNA_types.h"
|
||||
|
@ -396,6 +397,13 @@ void node_socket_copy_default_value(bNodeSocket *to, const bNodeSocket *from)
|
|||
id_us_plus(&toval->value->id);
|
||||
break;
|
||||
}
|
||||
case SOCK_MATERIAL: {
|
||||
bNodeSocketValueMaterial *toval = (bNodeSocketValueMaterial *)to->default_value;
|
||||
bNodeSocketValueMaterial *fromval = (bNodeSocketValueMaterial *)from->default_value;
|
||||
*toval = *fromval;
|
||||
id_us_plus(&toval->value->id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
to->flag |= (from->flag & SOCK_HIDE_VALUE);
|
||||
|
|
Loading…
Reference in New Issue