Page MenuHome

Fix T38691: Curve object bevel not working in group instance
ClosedPublic

Authored by Sergey Sharybin (sergey) on Feb 18 2014, 10:03 AM.

Details

Summary

It is possible that objects from dupli-groups depends on objects which are
not in the dupli-group. We do need this objects to be evaluated as well on
visible changes, so all dependencies for objects from the dupli-group are
met. Unfortunately, we don't have parent relations on this state, so we're
to use DFS over the whole DAG to gather such dependencies.

This is probably not so bad since visible update is called really rarely.

Diff Detail

Repository
rB Blender
Branch
fix_38691

Event Timeline

Looks OK to me, but not sure it covers all cases.

source/blender/blenkernel/intern/depsgraph.c
2329

Is this case really only possible with dupligroups? I wonder if it is possible to create a setup where an object depends on another object that is not in the scene.

source/blender/blenkernel/intern/depsgraph.c
2329

I'm not sure about this. Thought you might know..

source/blender/blenkernel/intern/depsgraph.c
2329

It seems to be possible.

In the example .blend you can remove the dupligroup and add a curve, then use BezierCircle as the bevel object, and it will give the same problem because BezierCircle is in the other scene.

So this code always has to run regardless if there is a group, which isn't so bad I think.

Sergey Sharybin (sergey) updated this revision to Unknown Object (????).Feb 18 2014, 3:24 PM

Fixed visible update to work in cases when dependencies
are not in the current scene.

Unfortunately, it doesn't fully solve the issue. It is still
possible to make blender crash with the following steps:

  • Drop the dupligroup
  • Add bezier curve
  • Save and reload (so no curve_cache are there)
  • Set BezierCircle (which is in another scene) as a bevel object

This would set object which is not ready for update as a bevel
and for sure curve update will fail because of missing curve_cache
for the circle.

Sergey Sharybin (sergey) updated this revision to Unknown Object (????).Feb 18 2014, 5:57 PM

Updated the patch to deal with all known failure cases

source/blender/blenkernel/intern/depsgraph.c
1395

Shouldn't this be return false?

Sergey Sharybin (sergey) updated this revision to Unknown Object (????).Feb 18 2014, 6:08 PM

Spelling correction

source/blender/blenkernel/intern/depsgraph.c
1395

You're absolutely right.

Sergey Sharybin (sergey) updated this revision to Unknown Object (????).Feb 18 2014, 6:09 PM

Fixed a typo in check_object_data_needs_evaluation()