fix: material roughtness loading

fix: graph pre-load broken

Related to #68
This commit is contained in:
Swann Martinez
2020-02-26 15:11:27 +01:00
parent 3d2ff10f80
commit a811211061
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,7 @@ class BlMaterial(BlDatablock):
def construct(self, data): def construct(self, data):
return bpy.data.materials.new(data["name"]) return bpy.data.materials.new(data["name"])
def load(self, data, target): def load_implementation(self, data, target):
target.name = data['name'] target.name = data['name']
if data['is_grease_pencil']: if data['is_grease_pencil']:
if not target.is_grease_pencil: if not target.is_grease_pencil:
@ -95,6 +95,8 @@ class BlMaterial(BlDatablock):
target.node_tree.nodes.clear() target.node_tree.nodes.clear()
utils.dump_anything.load(target,data)
# Load nodes # Load nodes
for node in data["node_tree"]["nodes"]: for node in data["node_tree"]["nodes"]:
load_node(target.node_tree, data["node_tree"]["nodes"][node]) load_node(target.node_tree, data["node_tree"]["nodes"][node])