Fix: GP: Vertex Paint is very slow in heavier files
For some reason, the vertex paint modal operator was calling `CTX_data_ensure_evaluated_depsgraph` on every event update. For obvious reasons, this caused performance to go down drastically in bigger files. Specifically in one of the Blender Studio files. The fix uses `CTX_data_depsgraph_pointer` instead to get the `Depsgraph` pointer, avoiding a full reevaluation of the scene.
This commit is contained in:
parent
fdf75dcf99
commit
e3a02b9b02
|
@ -1108,7 +1108,7 @@ static bool gpencil_vertexpaint_brush_do_frame(bContext *C,
|
||||||
static bool gpencil_vertexpaint_brush_apply_to_layers(bContext *C, tGP_BrushVertexpaintData *gso)
|
static bool gpencil_vertexpaint_brush_apply_to_layers(bContext *C, tGP_BrushVertexpaintData *gso)
|
||||||
{
|
{
|
||||||
ToolSettings *ts = CTX_data_tool_settings(C);
|
ToolSettings *ts = CTX_data_tool_settings(C);
|
||||||
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
|
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
|
||||||
Object *obact = gso->object;
|
Object *obact = gso->object;
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue