Fix T57981: Crash entering sculpt mode
This commit is contained in:
parent
7ec5a68091
commit
4c31bed6b4
Notes:
blender-bot
2023-02-14 08:35:51 +01:00
Referenced by issue #62813, blender crashing Referenced by issue #62759, Blender keeps crashing Referenced by issue #59823, Shape Keys don't work with Bevel modifier switched on Referenced by issue #59759, EEVEE Has Glitch on Startup Referenced by issue #59557, crashed after change delete and choise another material Referenced by issue #59516, crash for rendering a curve Referenced by issue #59306, Incorrect White Referenced by issue #59309, Viewport face orientation colours (non-overlay) appear to have been unified Referenced by issue #59154, Texture Paint Crash When Painting Only Selected Faces Referenced by issue #58930, Blender 2.8 Beta. Eevee crashes when trying to do a render Referenced by issue #58689, Glass Material Blend Mode Crash Referenced by issue #58572, Restrict Viewport Render keyframes from 2.79b do not correctly import into 2.8 Referenced by issue #58549, Color input adjusts more than one HSV field Referenced by issue #58507, Creating a NEW scene causes issues when assigning a new material with colors. Solid red,(ff0000) blue and green Referenced by issue #58453, Crash when rendering with stereoscopy->Multi-View Referenced by issue #58363, Vector Curves node incorrect output after changing clip range Referenced by issue #58351, Make Single User crashes Referenced by issue #58345, Align Objects is not working Referenced by issue #58327, Quick Favorites "Remove from Favorites" missing for added Modifiers Referenced by issue #58291, unable to select Vert/edge/face after moving them in Wireframemode(Eevee) Referenced by issue #58295, Black Viewport on load Referenced by issue #58281, Wrong result with alpha for Principled BSDF base color Referenced by issue #58267, Node input output grabbing Referenced by issue #57981, Blender crash entering sculpt mode
|
@ -131,7 +131,6 @@ void nested_id_hack_discard_pointers(ID *id_cow)
|
|||
SPECIAL_CASE(ID_LS, FreestyleLineStyle, nodetree)
|
||||
SPECIAL_CASE(ID_LA, Lamp, nodetree)
|
||||
SPECIAL_CASE(ID_MA, Material, nodetree)
|
||||
SPECIAL_CASE(ID_SCE, Scene, nodetree)
|
||||
SPECIAL_CASE(ID_TE, Tex, nodetree)
|
||||
SPECIAL_CASE(ID_WO, World, nodetree)
|
||||
|
||||
|
@ -139,6 +138,17 @@ void nested_id_hack_discard_pointers(ID *id_cow)
|
|||
SPECIAL_CASE(ID_LT, Lattice, key)
|
||||
SPECIAL_CASE(ID_ME, Mesh, key)
|
||||
|
||||
case ID_SCE:
|
||||
{
|
||||
Scene *scene_cow = (Scene *)id_cow;
|
||||
/* Node trees always have their own ID node in the graph, and are
|
||||
* being copied as part of their copy-on-write process. */
|
||||
scene_cow->nodetree = NULL;
|
||||
/* Tool settings pointer is shared with the original scene. */
|
||||
scene_cow->toolsettings = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
case ID_OB:
|
||||
{
|
||||
/* Clear the ParticleSettings pointer to prevent doubly-freeing it. */
|
||||
|
@ -174,7 +184,6 @@ const ID *nested_id_hack_get_discarded_pointers(NestedIDHackTempStorage *storage
|
|||
SPECIAL_CASE(ID_LS, FreestyleLineStyle, nodetree, linestyle)
|
||||
SPECIAL_CASE(ID_LA, Lamp, nodetree, lamp)
|
||||
SPECIAL_CASE(ID_MA, Material, nodetree, material)
|
||||
SPECIAL_CASE(ID_SCE, Scene, nodetree, scene)
|
||||
SPECIAL_CASE(ID_TE, Tex, nodetree, tex)
|
||||
SPECIAL_CASE(ID_WO, World, nodetree, world)
|
||||
|
||||
|
@ -182,6 +191,14 @@ const ID *nested_id_hack_get_discarded_pointers(NestedIDHackTempStorage *storage
|
|||
SPECIAL_CASE(ID_LT, Lattice, key, lattice)
|
||||
SPECIAL_CASE(ID_ME, Mesh, key, mesh)
|
||||
|
||||
case ID_SCE:
|
||||
{
|
||||
storage->scene = *(Scene *)id;
|
||||
storage->scene.toolsettings = NULL;
|
||||
storage->scene.nodetree = NULL;
|
||||
return &storage->scene.id;
|
||||
}
|
||||
|
||||
# undef SPECIAL_CASE
|
||||
|
||||
default:
|
||||
|
@ -629,6 +646,7 @@ void update_special_pointers(const Depsgraph *depsgraph,
|
|||
{
|
||||
Scene *scene_cow = (Scene *)id_cow;
|
||||
const Scene *scene_orig = (const Scene *)id_orig;
|
||||
scene_cow->toolsettings = scene_orig->toolsettings;
|
||||
scene_cow->eevee.light_cache = scene_orig->eevee.light_cache;
|
||||
break;
|
||||
}
|
||||
|
@ -1003,6 +1021,7 @@ void discard_mesh_edit_mode_pointers(ID *id_cow)
|
|||
void discard_scene_pointers(ID *id_cow)
|
||||
{
|
||||
Scene *scene_cow = (Scene *)id_cow;
|
||||
scene_cow->toolsettings = NULL;
|
||||
scene_cow->eevee.light_cache = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue