* start RNA_screen
authorNathan Letwory <nathan@letworyinteractive.com>
Sat, 29 Nov 2008 01:04:15 +0000 (01:04 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Sat, 29 Nov 2008 01:04:15 +0000 (01:04 +0000)
* nicer RNA names for NodeTree and Node

source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_screen.c [new file with mode: 0644]

index 935467edec4c56638be60a0b28940637ac76d04c..703b0c70ffd2983c76905faea2c7b9bcbf83df89 100644 (file)
@@ -70,8 +70,9 @@ extern StructRNA RNA_CollectionProperty;
 extern StructRNA RNA_Scene;
 extern StructRNA RNA_Lamp;
 extern StructRNA RNA_Material;
-extern StructRNA RNA_bNodeTree;
-extern StructRNA RNA_bNode;
+extern StructRNA RNA_NodeTree;
+extern StructRNA RNA_Node;
+extern StructRNA RNA_Screen;
 extern StructRNA RNA_Operator;
 extern StructRNA RNA_WindowManager;
 
index ac27e51bc9220a57441c0d01228484a5d071e6ce..bd426b20214ca956480c0cd8511150ab721e23c2 100644 (file)
@@ -868,6 +868,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
        {"rna_rna.c", RNA_def_rna},
        {"rna_scene.c", RNA_def_scene},
        {"rna_lamp.c", RNA_def_lamp},
+       {"rna_screen.c", RNA_def_screen},
        {"rna_wm.c", RNA_def_wm},
        {NULL, NULL}};
 
index ae952cc0fd1c98abec529898482014f7e4ec0d76..b5a5a41069fa069a2b9634f4d09fd4e82d3d520c 100644 (file)
@@ -60,10 +60,11 @@ static StructRNA *rna_ID_refine(PointerRNA *ptr)
        switch(GS(id->name)) {
                case ID_LA: return &RNA_Lamp;
                case ID_MA: return &RNA_Material;
-               case ID_NT: return &RNA_bNodeTree;
+               case ID_NT: return &RNA_NodeTree;
                case ID_ME: return &RNA_Mesh;
                case ID_OB: return &RNA_Object;
                case ID_SCE: return &RNA_Scene;
+               case ID_SCR: return &RNA_Screen;
                case ID_WM: return &RNA_WindowManager;
                default: return &RNA_ID;
        }
index bc92ae64b4c78e30bb5a30a5405397081256a21f..aedd80e0d025ca08e3adf2a76a726ca6896b0c95 100644 (file)
@@ -89,6 +89,7 @@ void RNA_def_nodetree(struct BlenderRNA *brna);
 void RNA_def_material(struct BlenderRNA *brna);
 void RNA_def_rna(struct BlenderRNA *brna);
 void RNA_def_scene(struct BlenderRNA *brna);
+void RNA_def_screen(struct BlenderRNA *brna);
 void RNA_def_wm(struct BlenderRNA *brna);
 
 /* ID Properties */
index 82ee9c24bcc41c363cb8d9fc960fc886eb323fdf..fde151ce9ee26457a266dce364239c10262c8c67 100644 (file)
@@ -133,12 +133,16 @@ static void rna_Main_world_begin(CollectionPropertyIterator *iter, PointerRNA *p
        rna_iterator_listbase_begin(iter, &bmain->world, NULL);
 }
 
+#endif
+
 static void rna_Main_screen_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
 {
        Main *bmain= (Main*)ptr->data;
        rna_iterator_listbase_begin(iter, &bmain->screen, NULL);
 }
 
+#if 0
+
 static void rna_Main_script_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
 {
        Main *bmain= (Main*)ptr->data;
@@ -220,9 +224,10 @@ void RNA_def_main(BlenderRNA *brna)
                {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks."},
                {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks."},
                {"materials", "Material", "rna_Main_mat_begin", "Materials", "Material datablocks."},
-               {"nodetrees", "bNodeTree", "rna_Main_nodetree_begin", "Node Trees", "Nodetree datablocks."},
+               {"nodetrees", "NodeTree", "rna_Main_nodetree_begin", "Node Trees", "Nodetree datablocks."},
                {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh datablocks."}, 
                {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp datablocks."},
+               {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks."},
                {"windowmanagers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks."},
                {NULL, NULL, NULL, NULL, NULL},
                {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks."},
@@ -235,7 +240,6 @@ void RNA_def_main(BlenderRNA *brna)
                {"ipos", "Ipo", "rna_Main_ipo_begin", "Ipos", "Ipo datablocks."},
                {"keys", "Key", "rna_Main_key_begin", "Keys", "Key datablocks."},
                {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks."},
-               {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks."},
                {"scripts", "Script", "rna_Main_script_begin", "Scripts", "Script datablocks."},
                {"vfonts", "VFont", "rna_Main_vfont_begin", "VFonts", "VFont datablocks."},
                {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks."},
index aa1030fef31fbd62aeefea24a3c318fe1533c89e..b86a98eb3b496029b15c2155ed8df2f17d278377 100644 (file)
@@ -165,7 +165,7 @@ void RNA_def_material(BlenderRNA *brna)
        
        /* nodetree */
        prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
-       RNA_def_property_struct_type(prop, "bNodeTree");
+       RNA_def_property_struct_type(prop, "NodeTree");
        RNA_def_property_ui_text(prop, "Nodetree", "Nodetree");
 
 }
index bef4ec42009ab720c8d8cc0bcd66463d8a96aaec..72f7534fa4d2f530d83f5b1d2422113a3b135df1 100644 (file)
@@ -40,15 +40,17 @@ void RNA_def_nodetree(BlenderRNA *brna)
        StructRNA *srna;
        PropertyRNA *prop;
        
-       srna= RNA_def_struct(brna, "bNodeTree", "ID", "Node Tree");
+       srna= RNA_def_struct(brna, "NodeTree", "ID", "Node Tree");
+       RNA_def_struct_sdna(srna, "bNodeTree");
 
        prop= RNA_def_property(srna, "Nodes", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_collection_sdna(prop, NULL, "nodes", NULL);
-       RNA_def_property_struct_type(prop, "bNode");
+       RNA_def_property_struct_type(prop, "Node");
        RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
        RNA_def_property_ui_text(prop, "Nodes", "Nodes in the Node Tree.");
        
-       srna= RNA_def_struct(brna, "bNode", NULL, "Node");
+       srna= RNA_def_struct(brna, "Node", NULL, "Node");
+       RNA_def_struct_sdna(srna, "bNode");
        
        prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
        RNA_def_property_float_sdna(prop, NULL, "locx");
index 15f5622436b4b5a1552ce468427b6a16c414ed48..68e8c8234984c5c3f34d1186460df77145c39bf4 100644 (file)
@@ -142,7 +142,7 @@ void RNA_def_scene(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Unwrapper", "Unwrap algorithm used by the Unwrap tool.");
        
        prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
-       RNA_def_property_struct_type(prop, "bNodeTree");
+       RNA_def_property_struct_type(prop, "NodeTree");
        RNA_def_property_ui_text(prop, "Nodetree", "Nodetree");
 }
 
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
new file mode 100644 (file)
index 0000000..043c98d
--- /dev/null
@@ -0,0 +1,50 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * Contributor(s): Blender Foundation (2008), Nathan Letwory
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+
+#include "RNA_define.h"
+#include "RNA_types.h"
+
+#include "rna_internal.h"
+
+#include "DNA_screen_types.h"
+#include "DNA_scene_types.h"
+
+#ifdef RNA_RUNTIME
+
+#else
+
+void RNA_def_screen(BlenderRNA *brna)
+{
+       StructRNA *srna;
+       PropertyRNA *prop;
+       
+       srna= RNA_def_struct(brna, "Screen", "ID", "Screen");
+       RNA_def_struct_sdna(srna, "bScreen");
+}
+
+#endif
+
+