From e88a715364981af39353073c6d96b9056fafca6b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 27 Feb 2020 13:55:29 +0100 Subject: Cleanup: more refactoring of GPU material attributes and textures This further separates requested attributes and textures from the actual node graph, that can be retained after the graph has been compiled and freed. It makes it easier to add volume grids as a native concept, which sits somewhere between an attribute and a texture. It also adds explicit link types for UDIM tile mapping, rather than relying on fairly hidden logic. --- source/blender/gpu/intern/gpu_material.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source/blender/gpu/intern/gpu_material.c') diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index d8d3e5a2ff2..b2658839d67 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -207,11 +207,6 @@ GPUPass *GPU_material_get_pass(GPUMaterial *material) return material->pass; } -ListBase *GPU_material_get_inputs(GPUMaterial *material) -{ - return &material->graph.inputs; -} - /* Return can be NULL if it's a world material. */ Material *GPU_material_get_material(GPUMaterial *material) { @@ -579,9 +574,9 @@ void GPU_material_output_link(GPUMaterial *material, GPUNodeLink *link) } } -void gpu_material_add_node(GPUMaterial *material, GPUNode *node) +GPUNodeGraph *gpu_material_node_graph(GPUMaterial *material) { - BLI_addtail(&material->graph.nodes, node); + return &material->graph; } GSet *gpu_material_used_libraries(GPUMaterial *material) -- cgit v1.2.3