diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-25 15:22:42 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-25 15:22:42 +0300 |
commit | 6e11cfc56af4e1594972d134e4e0c5d256d1fcce (patch) | |
tree | a020bf157f20008b85a551ce94f3576acc0b4f47 /source/blender/makesrna | |
parent | 1a853a9e90e9f1a8a5028bd1ce37785e1b2ce6d5 (diff) |
Curves: add surface object pointer
Ref T95776.
Differential Revision: https://developer.blender.org/D14182
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_curves.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_curves.c b/source/blender/makesrna/intern/rna_curves.c index 1552a7ddbfb..7a1a368551f 100644 --- a/source/blender/makesrna/intern/rna_curves.c +++ b/source/blender/makesrna/intern/rna_curves.c @@ -16,6 +16,8 @@ #include "BLI_math_base.h" #include "BLI_string.h" +#include "WM_types.h" + #ifdef RNA_RUNTIME # include "BLI_math_vector.h" @@ -265,6 +267,13 @@ static void rna_def_curves(BlenderRNA *brna) RNA_def_property_collection_funcs( prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int"); + prop = RNA_def_property(srna, "surface", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "Object"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Mesh_object_poll"); + RNA_def_property_ui_text(prop, "Surface", "Mesh object that the curves can be attached to"); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + /* attributes */ rna_def_attributes_common(srna); |