diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2008-11-29 04:04:15 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2008-11-29 04:04:15 +0300 |
commit | 6cb554fa9666d7f3f7d558b50673f7379b9bb759 (patch) | |
tree | 4b206fbdb27604564d6962861bb5e4d6d1172f90 /source | |
parent | 001f9558a310ed05671ce7324ac02de410279259 (diff) |
* start RNA_screen
* nicer RNA names for NodeTree and Node
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_internal.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 50 |
9 files changed, 70 insertions, 10 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 935467edec4..703b0c70ffd 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -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; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index ac27e51bc92..bd426b20214 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -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}}; diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index ae952cc0fd1..b5a5a41069f 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -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; } diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index bc92ae64b4c..aedd80e0d02 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -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 */ diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 82ee9c24bcc..fde151ce9ee 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -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."}, diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index aa1030fef31..b86a98eb3b4 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -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"); } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index bef4ec42009..72f7534fa4d 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -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"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 15f5622436b..68e8c823498 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -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 index 00000000000..043c98d9166 --- /dev/null +++ b/source/blender/makesrna/intern/rna_screen.c @@ -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 + + |