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.
This commit is contained in:
@@ -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()
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user