diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-13 17:13:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-13 17:13:25 +0300 |
commit | 1add5b58e8e290003a40cf3a123af22703c2fb3b (patch) | |
tree | ae0f0c4b8927a8ef498186ee0811996b72147ccd /source | |
parent | 58808a7befc403dfef341317f864bca36364cbc7 (diff) |
mesh.faces.active attribute for Michael Williamson to help port 2.4x UV unwrap scripts
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 355314f5c92..3163f38af3d 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1517,6 +1517,27 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable) RNA_def_property_ui_text(prop, "Materials", ""); } + +/* scene.objects */ +static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + PropertyRNA *prop; + +// FunctionRNA *func; +// PropertyRNA *parm; + + RNA_def_property_srna(cprop, "MeshFaces"); + srna= RNA_def_struct(brna, "MeshFaces", NULL); + RNA_def_struct_sdna(srna, "Mesh"); + RNA_def_struct_ui_text(srna, "Mesh Faces", "Collection of mesh faces."); + + prop= RNA_def_property(srna, "active", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "act_face"); + RNA_def_property_ui_text(prop, "Active Face", "The active face for this mesh"); +} + + static void rna_def_mesh(BlenderRNA *brna) { StructRNA *srna; @@ -1540,6 +1561,7 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "mface", "totface"); RNA_def_property_struct_type(prop, "MeshFace"); RNA_def_property_ui_text(prop, "Faces", "Faces of the mesh."); + rna_def_mesh_faces(brna, prop); prop= RNA_def_property(srna, "sticky", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "msticky", "totvert"); |