diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-03-24 05:15:04 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-03-24 05:15:04 +0300 |
commit | c4956faf993c6fcd8e8726ed9d05d07682798454 (patch) | |
tree | a5b27a425c934f03c130328195c657e73f30c94f /source/blender/blenkernel/BKE_fcurve.h | |
parent | 322f86d6b330ebeb1da5c1f527714745dc901460 (diff) |
Drivers UI: Added name validation/linting for Driver Variables
When attempting to change a driver variable name to an "invalid" name,
an indicator will now be shown beside the offending variable name.
Clicking on this icon will show a popup which provides more information
about why the variable name cannot be used.
Reasons that it knows about are:
1) Starts with number
2) Has a dot
3) Has a space
4) Starts with or contains a special character
5) Starts with an underscore (Python does allow this, but it's bad practice,
and makes checking security of drivers harder)
6) Is a reserved Python keyword
Diffstat (limited to 'source/blender/blenkernel/BKE_fcurve.h')
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 443a03a475a..a1176b91312 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -95,6 +95,7 @@ struct ChannelDriver *fcurve_copy_driver(struct ChannelDriver *driver); void driver_free_variable(struct ChannelDriver *driver, struct DriverVar *dvar); void driver_change_variable_type(struct DriverVar *dvar, int type); +void driver_variable_name_validate(struct DriverVar *dvar); struct DriverVar *driver_add_new_variable(struct ChannelDriver *driver); float driver_get_variable_value(struct ChannelDriver *driver, struct DriverVar *dvar); |