diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-18 21:52:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-18 21:52:26 +0400 |
commit | f4d8be977fa657be8c3e9201fc39aebb6043e225 (patch) | |
tree | e1159895273ecb4316873111b6949a189d48a3e5 /source/blender/makesrna/intern/rna_space.c | |
parent | 0c41635f8590289e17237db9d7a71ad49649cf6d (diff) |
there wasn't a good way to know if a RegionView3D was perspective or not (without having the View3D too and checking its camera values), added struct member 'is_persp', set with the view matrix.
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 2dbbb29f174..6b6071c4912 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1435,6 +1435,11 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_enum_items(prop, rv3d_persp_items); RNA_def_property_ui_text(prop, "Perspective", "View Perspective"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); + + prop= RNA_def_property(srna, "is_perspective", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "is_persp", 1); + RNA_def_property_ui_text(prop, "Is Perspective", ""); + RNA_def_property_flag(prop, PROP_EDITABLE); prop= RNA_def_property(srna, "view_location", PROP_FLOAT, PROP_TRANSLATION); #if 0 |