Fix: GPv3 not rendering when origin is out of view
This was because the `ob->runtime.geometry_set_eval` was populated with the new `GreasePencilComponent` but `GeometrySet::compute_boundbox_without_instances()` did not compute the bounding box of the grease pencil geometry. Thus the bounding box was not correctly set and the object not correctly rendered.
This commit is contained in:
parent
d43ceb1974
commit
873453005d
@ -12,6 +12,7 @@
|
||||
#include "BKE_curves.hh"
|
||||
#include "BKE_geometry_set.hh"
|
||||
#include "BKE_geometry_set_instances.hh"
|
||||
#include "BKE_grease_pencil.hh"
|
||||
#include "BKE_instances.hh"
|
||||
#include "BKE_lib_id.h"
|
||||
#include "BKE_mesh.hh"
|
||||
@ -221,6 +222,9 @@ std::optional<Bounds<float3>> GeometrySet::compute_boundbox_without_instances()
|
||||
if (const Curves *curves_id = this->get_curves_for_read()) {
|
||||
bounds = bounds::merge(bounds, curves_id->geometry.wrap().bounds_min_max());
|
||||
}
|
||||
if (const GreasePencil *grease_pencil = this->get_grease_pencil_for_read()) {
|
||||
bounds = bounds::merge(bounds, grease_pencil->bounds_min_max());
|
||||
}
|
||||
return bounds;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user