From 780cabb7a8ff8da0313217e7f6c039423fbf4bf7 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 12 Feb 2021 13:39:19 +0100 Subject: Fix T85558: crash changing the resolution mode of the "volume to mesh" node The nodes update function geo_node_volume_to_mesh_update would not run if it is not the very first node in the tree. If the update function is not run, there are sockets not cleared from the SOCK_UNAVAIL flag (but this needs to be done -- these get available depending on the chosen mode). Havent tracked down why this was actually updating when it was the first node in the tree, but now make sure we always get an update by specifing an appropriate RNA update callback for the property. Maniphest Tasks: T85558 Differential Revision: https://developer.blender.org/D10403 --- source/blender/makesrna/intern/rna_nodetree.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 610edb0e37c..3a9d373e30e 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -9029,6 +9029,7 @@ static void def_geo_volume_to_mesh(StructRNA *srna) prop = RNA_def_property(srna, "resolution_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, resolution_mode_items); RNA_def_property_ui_text(prop, "Resolution Mode", "How the voxel size is specified"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); } static void def_geo_attribute_combine_xyz(StructRNA *srna) -- cgit v1.2.3