Falk David cb0ab83eab Fix #127527: Crash drawing with non-GP material
It was possible for a Grease Pencil object to have a material
with no Grease Pencil settings. This can lead to crashes in many
places because it's often assumed that the material has
these settings.

The fix makes sure that `BKE_object_material_get` returns
a Grease Pencil material when called on a Grease Pencil
object.  If the Grease Pencil settings don't exist,
it returns `nullptr`.

In the future, it should be possible to have these materials
and code that reads from the settings should fall back to
the default material.

Pull Request: https://projects.blender.org/blender/blender/pulls/127570
2024-09-16 12:03:05 +02:00
2024-09-13 14:01:51 +10:00
2024-09-13 16:56:51 +02:00
2024-09-16 12:02:30 +02:00
2023-12-08 13:28:13 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%