Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-01-12 22:46:13 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-01-17 13:59:59 +0300
commit71bc9d47601a433ace7073478a2ffffb92acbcaf (patch)
treebfff0680e5700bd46eac8a95c86eee3b791a6ba6 /source
parent1d462e172981671f9d023f2a37fdb0f2c1055b4d (diff)
Fix T94624: Object as font instances don't work
The fundamental limitation is that we can only have one instance ("dupli") generator at a time. Because the mesh output of a curve object is output as an instances, the geometry set instances existed, replacing the object as font instances. The "fix" is to reverse the order. The behavior won't be perfect still, but at least the old behavior will be preserved, which is really what matters for a feature like this. One way to take this change further would be completely disabling regular geometry evaluation while this option is active. However, it doesn't seem like that would actually improve the state of the code. Differential Revision: https://developer.blender.org/D13768
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/object_dupli.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.cc b/source/blender/blenkernel/intern/object_dupli.cc
index 442755be15d..b5a07ae6b08 100644
--- a/source/blender/blenkernel/intern/object_dupli.cc
+++ b/source/blender/blenkernel/intern/object_dupli.cc
@@ -1640,6 +1640,14 @@ static const DupliGenerator *get_dupli_generator(const DupliContext *ctx)
return nullptr;
}
+ /* Give "Object as Font" instances higher priority than geometry set instances, to retain
+ * the behavior from before curve object meshes were processed as instances internally. */
+ if (transflag & OB_DUPLIVERTS) {
+ if (ctx->object->type == OB_FONT) {
+ return &gen_dupli_verts_font;
+ }
+ }
+
if (ctx->object->runtime.geometry_set_eval != nullptr) {
if (BKE_object_has_geometry_set_instances(ctx->object)) {
return &gen_dupli_geometry_set;
@@ -1653,9 +1661,6 @@ static const DupliGenerator *get_dupli_generator(const DupliContext *ctx)
if (ctx->object->type == OB_MESH) {
return &gen_dupli_verts;
}
- if (ctx->object->type == OB_FONT) {
- return &gen_dupli_verts_font;
- }
if (ctx->object->type == OB_POINTCLOUD) {
return &gen_dupli_verts_pointcloud;
}