Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2010-08-26 11:19:24 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-08-26 11:19:24 +0400
commitfb7221ce217a3b7ef8852fea73d3e3dfaef06ee0 (patch)
tree0df4cc0b758fb19d2002b5cadfc488ae179ba7c9
parent92422ba4525dedfc1687dfff14e11ee805a30c23 (diff)
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.
-rw-r--r--release/scripts/ui/space_userpref.py3
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c6
3 files changed, 10 insertions, 3 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index cf0ef4939ef..1c878d1cdbf 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -369,6 +369,7 @@ class USERPREF_PT_system(bpy.types.Panel):
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 @@ def unregister():
pass
if __name__ == "__main__":
- register()
+ register() \ No newline at end of file
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index ceac7e4d1d7..0591872fa69 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -377,6 +377,8 @@ typedef struct UserDef {
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 @@ extern UserDef U; /* from blenkernel blender.c */
#define TH_OLDSKOOL 3
#define TH_SHADED 4
-#endif
+#endif \ No newline at end of file
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 0c3a22e4c16..632d8c1be29 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2376,6 +2376,11 @@ static void rna_def_userdef_system(BlenderRNA *brna)
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 @@ void RNA_def_userdef(BlenderRNA *brna)
}
#endif
-