[Bf-blender-cvs] [041ff44] temp_localview_split: Expose new local view in RNA

Julian Eisel noreply at git.blender.org
Mon Aug 8 00:29:36 CEST 2016


Commit: 041ff44d7a0e7efe796813a726bfa98cd5ae5dec
Author: Julian Eisel
Date:   Mon Aug 8 00:28:26 2016 +0200
Branches: temp_localview_split
https://developer.blender.org/rB041ff44d7a0e7efe796813a726bfa98cd5ae5dec

Expose new local view in RNA

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

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

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

diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 43d5cda..df17226 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -192,6 +192,19 @@ static void rna_View2D_view_to_region(struct View2D *v2d, float x, float y, int
 
 #else
 
+static void rna_def_localview_info(BlenderRNA *brna)
+{
+	PropertyRNA *prop;
+
+	StructRNA *srna = RNA_def_struct(brna, "LocalViewInfo", NULL);
+	RNA_def_struct_ui_text(srna, "Local View Info", "");
+
+	prop = RNA_def_property(srna, "viewbits", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+	RNA_def_property_array(prop, 32);
+	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+	RNA_def_property_ui_text(prop, "Local View Layers", "");
+}
+
 /* Area.spaces */
 static void rna_def_area_spaces(BlenderRNA *brna, PropertyRNA *cprop)
 {
@@ -455,6 +468,7 @@ void RNA_def_screen(BlenderRNA *brna)
 	rna_def_area(brna);
 	rna_def_region(brna);
 	rna_def_view2d(brna);
+	rna_def_localview_info(brna);
 }
 
 #endif
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 2a383b8..aa8b786 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2297,6 +2297,17 @@ static void rna_def_backgroundImages(BlenderRNA *brna, PropertyRNA *cprop)
 	RNA_def_function_ui_description(func, "Remove all background images");
 }
 
+static void rna_def_localview_area_data(BlenderRNA *brna)
+{
+	PropertyRNA *prop;
+
+	StructRNA *srna = RNA_def_struct(brna, "LocalViewAreaData", NULL);
+	RNA_def_struct_sdna(srna, "LocalViewAreaData");
+	RNA_def_struct_ui_text(srna, "Local View Area Data", "Data storage for while an area is in local view");
+
+	prop = RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE);
+	RNA_def_property_ui_text(prop, "Local View Layers", "");
+}
 
 static void rna_def_space_view3d(BlenderRNA *brna)
 {
@@ -2426,6 +2437,12 @@ static void rna_def_space_view3d(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_viewport_shade_update");
 
+	prop = RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE);
+	RNA_def_property_pointer_sdna(prop, NULL, "localviewd");
+	RNA_def_property_ui_text(prop, "Local View",
+	                         "Display an isolated sub-set of objects, apart from the scene visibility");
+	rna_def_localview_area_data(brna);
+
 	prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
 	RNA_def_property_array(prop, 3);
 	RNA_def_property_float_funcs(prop, "rna_View3D_CursorLocation_get", "rna_View3D_CursorLocation_set", NULL);




More information about the Bf-blender-cvs mailing list