diff options
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 0e7c332f6a4..582d3061576 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -313,18 +313,6 @@ static void rna_MeshVertex_normal_get(PointerRNA *ptr, float *value) copy_v3_v3(value, vert_normals[index]); } -static void rna_MeshVertex_normal_set(PointerRNA *ptr, const float *value) -{ - Mesh *mesh = rna_mesh(ptr); - float(*vert_normals)[3] = BKE_mesh_vertex_normals_for_write(mesh); - - const int index = (MVert *)ptr->data - mesh->mvert; - BLI_assert(index >= 0); - BLI_assert(index < mesh->totvert); - - copy_v3_v3(vert_normals[index], value); -} - static float rna_MeshVertex_bevel_weight_get(PointerRNA *ptr) { MVert *mvert = (MVert *)ptr->data; @@ -1740,11 +1728,9 @@ static void rna_def_mvert(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Mesh_update_data_legacy_deg_tag_all"); prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION); - // RNA_def_property_float_sdna(prop, NULL, "no"); RNA_def_property_array(prop, 3); - RNA_def_property_range(prop, -1.0f, 1.0f); - RNA_def_property_float_funcs( - prop, "rna_MeshVertex_normal_get", "rna_MeshVertex_normal_set", NULL); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_float_funcs(prop, "rna_MeshVertex_normal_get", NULL, NULL); RNA_def_property_ui_text(prop, "Normal", "Vertex Normal"); prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); |