[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18196] branches/blender2.5/blender/source /blender: RNA

Brecht Van Lommel brecht at blender.org
Wed Dec 31 16:02:41 CET 2008


Revision: 18196
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18196
Author:   blendix
Date:     2008-12-31 16:02:40 +0100 (Wed, 31 Dec 2008)

Log Message:
-----------
RNA
* DNA_text_types.h done, patch by Roelf de Kock.
* Minor naming fixes in RNA-RNA.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c
    branches/blender2.5/blender/source/blender/makesrna/RNA_access.h
    branches/blender2.5/blender/source/blender/makesrna/intern/makesrna.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_ID.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_internal.h
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_main.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c

Modified: branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c	2008-12-31 13:16:37 UTC (rev 18195)
+++ branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c	2008-12-31 15:02:40 UTC (rev 18196)
@@ -3180,19 +3180,19 @@
 	else if(rnatype == &RNA_Group)
 		return ICON_GROUP;
 	/*else if(rnatype == &RNA_Particle)
-		return ICON_PARTICLES);*/
+		return ICON_PARTICLES;*/
 	else if(rnatype == &RNA_Material)
 		return ICON_MATERIAL;
 	/*else if(rnatype == &RNA_Texture)
-		return ICON_TEXTURE);*/
+		return ICON_TEXTURE;*/
 	else if(rnatype == &RNA_Image)
 		return ICON_TEXTURE;
 	else if(rnatype == &RNA_Screen)
 		return ICON_SPLITSCREEN;
 	else if(rnatype == &RNA_NodeTree)
 		return ICON_NODE;
-	/*else if(rnatype == &RNA_Text)
-		return ICON_TEXT);*/
+	else if(rnatype == &RNA_Text)
+		return ICON_TEXT;
 	else if(rnatype == &RNA_Sound)
 		return ICON_SOUND;
 	else if(rnatype == &RNA_Brush)
@@ -3200,7 +3200,7 @@
 	else if(rnatype == &RNA_Library)
 		return ICON_LIBRARY_DEHLT;
 	/*else if(rnatype == &RNA_Action)
-		return ICON_ACTION);*/
+		return ICON_ACTION;*/
 	else if(rnatype == &RNA_Ipo)
 		return ICON_IPO_DEHLT;
 	else if(rnatype == &RNA_Key)
@@ -3217,6 +3217,8 @@
 		return ICON_RNA;
 	else if(rnatype == &RNA_FloatProperty)
 		return ICON_RNA;
+	else if(rnatype == &RNA_StringProperty)
+		return ICON_RNA;
 	else if(rnatype == &RNA_EnumProperty)
 		return ICON_RNA;
 	else if(rnatype == &RNA_EnumPropertyItem)

Modified: branches/blender2.5/blender/source/blender/makesrna/RNA_access.h
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/RNA_access.h	2008-12-31 13:16:37 UTC (rev 18195)
+++ branches/blender2.5/blender/source/blender/makesrna/RNA_access.h	2008-12-31 15:02:40 UTC (rev 18196)
@@ -192,6 +192,7 @@
 extern StructRNA RNA_StringProperty;
 extern StructRNA RNA_Struct;
 extern StructRNA RNA_SubsurfModifier;
+extern StructRNA RNA_Text;
 extern StructRNA RNA_TextBox;
 extern StructRNA RNA_TouchSensor;
 extern StructRNA RNA_TransformSequence;

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/makesrna.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/makesrna.c	2008-12-31 13:16:37 UTC (rev 18195)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/makesrna.c	2008-12-31 15:02:40 UTC (rev 18196)
@@ -928,6 +928,7 @@
 	{"rna_screen.c", RNA_def_screen},
 	{"rna_sensor.c", RNA_def_sensor},
 	{"rna_sequence.c", RNA_def_sequence},
+	{"rna_text.c", RNA_def_text},
 	{"rna_sound.c", RNA_def_sound},
 	{"rna_vfont.c", RNA_def_vfont},
 	{"rna_wm.c", RNA_def_wm},

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_ID.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_ID.c	2008-12-31 13:16:37 UTC (rev 18195)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_ID.c	2008-12-31 15:02:40 UTC (rev 18196)
@@ -77,6 +77,7 @@
 		case ID_SCE: return &RNA_Scene;
 		case ID_SCR: return &RNA_Screen;
 		case ID_SO: return &RNA_Sound;
+		case ID_TXT: return &RNA_Text;
 		case ID_VF: return &RNA_VectorFont;
 		case ID_WO: return &RNA_World;
 		case ID_WM: return &RNA_WindowManager;

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_internal.h
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_internal.h	2008-12-31 13:16:37 UTC (rev 18195)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_internal.h	2008-12-31 15:02:40 UTC (rev 18196)
@@ -125,6 +125,7 @@
 void RNA_def_screen(struct BlenderRNA *brna);
 void RNA_def_sensor(struct BlenderRNA *brna);
 void RNA_def_sequence(struct BlenderRNA *brna);
+void RNA_def_text(struct BlenderRNA *brna);
 void RNA_def_sound(struct BlenderRNA *brna);
 void RNA_def_vfont(struct BlenderRNA *brna);
 void RNA_def_wm(struct BlenderRNA *brna);

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_main.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_main.c	2008-12-31 13:16:37 UTC (rev 18195)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_main.c	2008-12-31 15:02:40 UTC (rev 18196)
@@ -243,7 +243,7 @@
 		{"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks."},
 		{"keys", "ID", "rna_Main_key_begin", "Keys", "Key datablocks."},
 		{"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks."},
-		{"texts", "ID", "rna_Main_text_begin", "Texts", "Text datablocks."},
+		{"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks."},
 		{"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks."},
 		{"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks."},
 		{"actions", "ID", "rna_Main_action_begin", "Actions", "Action datablocks."},

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c	2008-12-31 13:16:37 UTC (rev 18195)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c	2008-12-31 15:02:40 UTC (rev 18196)
@@ -242,10 +242,10 @@
 	return prop->subtype;
 }
 
-static int rna_Property_readonly_get(PointerRNA *ptr)
+static int rna_Property_editable_get(PointerRNA *ptr)
 {
 	PropertyRNA *prop= (PropertyRNA*)ptr->data;
-	return RNA_property_editable(ptr, prop) ? 0 : 1;
+	return RNA_property_editable(ptr, prop);
 }
 
 static int rna_Property_array_length_get(PointerRNA *ptr)
@@ -420,7 +420,7 @@
 	prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
 	RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
 	RNA_def_property_string_funcs(prop, "rna_Struct_description_get", "rna_Struct_description_length", NULL);
-	RNA_def_property_ui_text(prop, "description", "This field explains the Struct's purpose");
+	RNA_def_property_ui_text(prop, "Description", "Description of the Struct's purpose.");
 	
 	prop= RNA_def_property(srna, "base", PROP_POINTER, PROP_NONE);
 	RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
@@ -497,10 +497,10 @@
 	RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL);
 	RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property.");
 	
-	prop= RNA_def_property(srna, "readonly", PROP_INT, PROP_NONE);
+	prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
-	RNA_def_property_int_funcs(prop, "rna_Property_readonly_get", NULL, NULL);
-	RNA_def_property_ui_text(prop, "Read Only", "Read Only setting for this property");
+	RNA_def_property_boolean_funcs(prop, "rna_Property_editable_get", NULL);
+	RNA_def_property_ui_text(prop, "Editable", "Property is editable through RNA.");
 }
 
 static void rna_def_number_property(StructRNA *srna, PropertyType type)





More information about the Bf-blender-cvs mailing list