diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-03-31 16:54:41 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-04-02 22:23:37 +0300 |
commit | e0a07700bfbe3a4d64e65d0d51adb8c44ef105d7 (patch) | |
tree | e145d87728d7e95e79d05ba1bf94d67cf3b368f5 /source/blender/blenkernel/BKE_blender_version.h | |
parent | fcc3227efd837de2733dd79d9f8baf9c3b6d01a8 (diff) |
GPencil: Prevent RNA assignment of invalid materials in modifiers
Materials used in grease pencil modifiers have the requirement that they
are already used on the object. In the UI dropdown, this restriction is
ensured by calling uiItemPointerR with appropriate searchptr and
searchpropname, so only giving the user the choice of materials already
used on the object.
From python though, it was still possible to assign materials outside of
this this restriction. This led to reports like T86981 [which have been
partially solved by clamping the material index in the modifier code to
be in the valid range].
Now make sure we dont assign "invalid" materials through RNA by
appropriate RNA pointer functions.
This also adds a proper warning (red, alert) in case of the LineArt
modifier if such a invalid material is still in the file [same as other
modifiers already do].
Differential Revision: https://developer.blender.org/D10873
Diffstat (limited to 'source/blender/blenkernel/BKE_blender_version.h')
0 files changed, 0 insertions, 0 deletions