[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31589] trunk/blender: Patch [#23390] Addition of Author field to user preferences

Nathan Letwory nathan at letworyinteractive.com
Thu Aug 26 09:19:24 CEST 2010


Revision: 31589
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31589
Author:   jesterking
Date:     2010-08-26 09:19:24 +0200 (Thu, 26 Aug 2010)

Log Message:
-----------
Patch [#23390] Addition of Author field to user preferences
Contributed by Imran Syed (freakabcd)

Adds a field where the user can put in name/nickname that exporters
then can use to write authoring information, where possible.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_userpref.py
    trunk/blender/source/blender/makesdna/DNA_userdef_types.h
    trunk/blender/source/blender/makesrna/intern/rna_userdef.c

Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py	2010-08-26 06:58:32 UTC (rev 31588)
+++ trunk/blender/release/scripts/ui/space_userpref.py	2010-08-26 07:19:24 UTC (rev 31589)
@@ -369,6 +369,7 @@
         col.prop(system, "dpi")
         col.prop(system, "frame_server_port")
         col.prop(system, "scrollback", text="Console Scrollback")
+        col.prop(system, "author", text="Author")
         col.prop(system, "use_scripts_auto_execute")
         col.prop(system, "use_tabs_as_spaces")
 
@@ -1217,4 +1218,4 @@
     pass
 
 if __name__ == "__main__":
-    register()
+    register()
\ No newline at end of file

Modified: trunk/blender/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_userdef_types.h	2010-08-26 06:58:32 UTC (rev 31588)
+++ trunk/blender/source/blender/makesdna/DNA_userdef_types.h	2010-08-26 07:19:24 UTC (rev 31589)
@@ -377,6 +377,8 @@
 
 	float sculpt_paint_overlay_col[3];
 	int pad3;
+
+	char author[80];	/* author name for file formats supporting it */
 } UserDef;
 
 extern UserDef U; /* from blenkernel blender.c */
@@ -556,4 +558,4 @@
 #define TH_OLDSKOOL 	3
 #define TH_SHADED   	4
 
-#endif
+#endif
\ No newline at end of file

Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2010-08-26 06:58:32 UTC (rev 31588)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2010-08-26 07:19:24 UTC (rev 31589)
@@ -2376,6 +2376,11 @@
 	RNA_def_property_range(prop, 32, 32768);
 	RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to store for the console buffer");
 
+	prop= RNA_def_property(srna, "author", PROP_STRING, PROP_NONE);
+	RNA_def_property_string_sdna(prop, NULL, "author");
+	RNA_def_property_string_maxlength(prop, 80);
+	RNA_def_property_ui_text(prop, "Author", "Name that will be used in exported files when format supports such feature");
+
 	/* Language Selection */
 
 	prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
@@ -2876,4 +2881,3 @@
 }
 
 #endif
-





More information about the Bf-blender-cvs mailing list