[Bf-blender-cvs] [14eadf55fdd] master: RNA: expose RegionView3D clip planes

mano-wii noreply at git.blender.org
Fri Sep 15 18:56:02 CEST 2017


Commit: 14eadf55fddb08d4b62a53eb59b04439ed66d187
Author: mano-wii
Date:   Fri Sep 15 13:55:52 2017 -0300
Branches: master
https://developer.blender.org/rB14eadf55fddb08d4b62a53eb59b04439ed66d187

RNA: expose RegionView3D clip planes

===================================================================

M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 2fd471a66ef..ed28b0d399b 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2838,6 +2838,16 @@ static void rna_def_space_view3d(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Is Perspective", "");
 	RNA_def_property_flag(prop, PROP_EDITABLE);
 
+	/* This isn't directly accessible from the UI, only an operator. */
+	prop = RNA_def_property(srna, "use_clip_planes", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "rflag", RV3D_CLIPPING);
+	RNA_def_property_ui_text(prop, "Use Clip Planes", "");
+
+	prop = RNA_def_property(srna, "clip_planes", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_float_sdna(prop, NULL, "clip");
+	RNA_def_property_multi_array(prop, 2, (int[]){6, 4});
+	RNA_def_property_ui_text(prop, "Clipe Planes", "");
+
 	prop = RNA_def_property(srna, "view_location", PROP_FLOAT, PROP_TRANSLATION);
 #if 0
 	RNA_def_property_float_sdna(prop, NULL, "ofs"); /* cant use because its negated */



More information about the Bf-blender-cvs mailing list