From 2821f822c52146e2e6fbcdeb70232ad2fd9a176f Mon Sep 17 00:00:00 2001 From: Jiri Hnidek Date: Fri, 26 Oct 2012 12:58:54 +0000 Subject: * New string property subtype: PASSWORD When this new subtypes is used, then string of property is hidden using asterisks, e.g.: mysecretpassword -> **************** This code was reviewed and modified by Brecht. Thanks very much: - https://codereview.appspot.com/6713044/ This new subtype of string property is intended mostly for Add-on developers writing Add-on which communicates with some server (http, sql, ftp, verse, etc.). When this server requires user authentication and user has to type username and password, then current API didn't allow to type 'hidden' password, e.g. when you want to demonstrate this script, then everybody can see this security password. Some examples of Add-on which could use this new subtype: - On-line database of textures - Integration of render farm - Integration of Verse Security Notes: - You can copy paste hiddent string of property from text input using (Ctrl-C, Ctrl-V), but you can do this in other GUI toolkits too (this behavior it is widely used). - Text of string property is stored in plain text, but it is widely used in other GUI toolkits (Qt, Gtk, etc.). Simple examples: - https://dl.dropbox.com/u/369894/draw_op_passwd.py - https://dl.dropbox.com/u/369894/blender-password.png --- source/blender/makesrna/RNA_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesrna/RNA_types.h') diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index 511999dfa37..7d6e07baebd 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -113,6 +113,7 @@ typedef enum PropertySubType { PROP_BYTESTRING = 4, /* a string which should be represented as bytes * in python, still NULL terminated though. */ PROP_TRANSLATE = 5, /* a string which should be translated */ + PROP_PASSWORD = 6, /* a string which should not be displayed in UI */ /* numbers */ PROP_UNSIGNED = 13, -- cgit v1.2.3