Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-06-05 18:51:46 +0300
committerJulian Eisel <julian@blender.org>2021-06-05 18:51:46 +0300
commit87a821397fa4db7b72ea809ee29c319cf4788a1a (patch)
tree5b14c3657585b7e64ce1a3e14492925e0a79f473 /source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
parentd6e9b0ce5d61f64a3879459c9d39a151aabdea81 (diff)
parentedaaa2afddb2132e56f39791e559b084b6df8773 (diff)
Merge branch 'master' into asset-system-filelistasset-system-filelist
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
index 2806472286e..4c1521aa6f1 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
@@ -17,6 +17,7 @@
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "BKE_material.h"
#include "BKE_mesh.h"
#include "UI_interface.h"
@@ -561,6 +562,7 @@ static void geo_node_mesh_primitive_cone_exec(GeoNodeExecParams params)
Mesh *mesh = create_cylinder_or_cone_mesh(
radius_top, radius_bottom, depth, verts_num, fill_type);
+ BKE_id_material_eval_ensure_default_slot(&mesh->id);
/* Transform the mesh so that the base of the cone is at the origin. */
BKE_mesh_translate(mesh, float3(0.0f, 0.0f, depth * 0.5f), false);