Age | Commit message (Collapse) | Author |
|
Do not generate materials/images/UVs if they are missing.
Now we spawn a panel ("Missing Data") with operators to generate the missing data and
pop a warning if user tries to paint without them.
The reason we have reverted this is that it is too easy to end up with more textures
than we wanted. It was impossible to enter texture paint without having textures added,
and code makes too many assumptions about what user may want.
Discussed during Sunday's meeting.
This might be a candidate for 2.72a but I'm not sure how other artists will take this
(and how refined and crash-free it is), better make a few iterations first.
And for interested parties...test please, don't wait until after a release to poke with such issues.
Also, add slot operator now adds a new unconnected image node in cycles. Only
used in the "Missing Data" panel. This should be a separate commit but I am squashing it into the same commit because
it relies too much on changes done here and can be reverted easily if complainstorm occurs again.
|
|
Core of the issue is that pointcache handling in depsgraph were (re-) tagging
for update some objects on hidden layers, when all their dependencies remained
untag.
Since we do not want to update objects on hidden layers, take this data into account
when flushing pointcache.
Investigations and org patch by self, reviews, advices and final patch by sergey, many thanks! :)
|
|
Free draw objects instead of tagging object update and doing
recalculation of derived meshes. The reason is that if user deletes all
slots and tries to paint, the system will invalidate the cached in
projection painting derivedmesh. This will promptly crash. Invalidating
the draw objects only is also much cheaper.
|
|
Also avoid looping over all objects for texture paint checks when a
material changes, only check active object.
|
|
internal.
This should eliminate some confusion when people use external render
engines.
|
|
|
|
The issue was caused by the wrong objects order for
convertblender.c. Dependency graph totally missed
handling of this situation.
Fixed now, but it's not that pretty, don't try this
at home obviously. But consider this to be good enough
for the current dependency graph.
Details are in the build_dag_object().
|
|
Yep, at last it's here!
There are a few minor issues remaining but development can go on in
master after discussion at blender institute.
For full list of features see:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting
Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
|
|
|
|
update image in Image Texture nodes
|
|
A bit hackish solution for now, cleaner solution we'll look into as a
part of the new DAG project, when it's clear what kind of data is passed
to the evaluation callbacks.
|
|
|
|
Now that Freestyle employs a separate Main, this workaround is no longer necessary.
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D513
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
This function used ugly hack with static variable which was
preventing some type checks in DAG nodes. Using this variable
form multiple threads is not considered safe, apparently.
Solved by moving this variable inside the DAGForest structure.
so it's global for the graph now, but different graphs does not
run into conflicts.
This required passing the forest to some functions, which doesn't
look so much nice, but don't want to spend time on making this
code look beautiful because it is really to be replaced by the
new dependency graph.
This is really bad bug actually which is must go to 'a'.
|
|
|
|
Issue was caused by cycles setting scene frame which will update scene for
all the layers (not just visible ones) which confuses depsgraph making
objects which are needed as dependency are not really evaluated.
Made it so setting frame via scene.frame_set() which check whether update
need to be flushed to an invisible objects and do this if so.
Not ideal solution but seems to be safest at this point.
|
|
|
|
|
|
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.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D326
|
|
updates.
This file crashes on loading with NULL pointer access to curve_cache:
{F77132}
The pdInitEffectors function was amalgamating the simple
collection of effector objects with an automatic precalculation for
curve guides and the like. This precalculation requires object data
that may not be available until the DAG has finished.
Since for DAG dependencies only the list of effectors is required,
added an argument to disable precalculation when collecting effectors.
|
|
|
|
|
|
|
|
its parent
This is rather a workaround which only works because curve evaluation is only called
for a temporary object. Not a big deal if we'll skip path creation for such objects.
Still would need to think of general solution.
|
|
it is possible that different windows shares scene but displays different
layers. And it's also possible that different areas in the same window will
show different layers.
First case was violated in `dag_current_scene_layers()` which only checked
scene layers only once and if multiple windows shares the same scene only
one window was handled. Now made it so layers from all windows will be
squashed together into a single `DagSceneLayer`. This mainly solves issue
with `DAG_on_visible_update()` which didn't work reliable with multiple
open windows.
Second case required call of `DAG_on_visible_update()` when changing space
are type.
This commit slows things a bit actually because `dag_current_scene_layers()`
is actually called on every main WM loop iteration. It is possible to speed
some logic up perhaps. Not sure it's so much critical to do now because there
are unlikely to be more than few windows open anyway.
Will rather think of skipping all that flushing things if no objects are
tagged for update actually.
|
|
Replacing the flags isn't thread safe and could lead to bi troubles.
Such things are to be handled by the dependency graph.
|
|
|
|
It was an issue with early object update check which was
screwing up for second scene because of first one reset
ID recalc flags.
From the comment in the code about this:
We need to check all visible scenes, otherwise resetting
OB_ID changed flag will only work fine for first scene of
multiple visible and all the rest will skip update.
This could also lead to wrong behavior scene update handlers
because of missing ID datablock changed flags.
This is a bit of a bummer to allocate list here, but likely
it wouldn't become too much bad because it only happens when
objects were actually changed.
|
|
|
|
Issue was caused by some objects being in bMain and tagged
for update but not being in the DAG. This means objects
wouldn't be updated and their recalc flag remains untouched
triggering threaded for the next frame.
Solved by tweaking POST_UPDATE_HANDLER_WORKAROUND in the way
that it checks objects' recalc flags from the DAG, not from
the bMain. This will work a bit longer since DAG stored more
nodes than objects in the scene, but this code only runs in
cases when there're some objects tagged for update, which
keeps overall CPU usage on such a workaround pretty low.
Now CPU usage on 11a_comp scene from project Pampa went down
from ~15% down to ~5% (2,69 release uses ~%7).
Pointed by Thomas Dinges in IRC.
|
|
Pointed by Bastien!
|
|
Issue is caused by the evaluation flags getter called with
NULL depsgraph. It happens on direct object update from the
transform code after duplicating the curve.
Proper solution is probably to make sure depsgraph is rebuild
after duplication, but for now it's better to prevent crashes.
|
|
Issue was caused by evaluation flags getter function polluting
the DAG. Need to use dag_find_node() instead.
Still need to doublecheck exporting objects with curve deform
works properly. On the first thought it should, but might be
wrong again.
|
|
This adds an ImageUser to such empties with all the typical settings.
Reviewed By: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D108
|
|
Graph traversal which is based on counting parents which are still
to be updated fails in cases there are cycles in the graph.
If there are cyclic dependencies in the scene all the objects from
the cycles will be updated in a single thread now one by one. This
makes blender behave the same way as it was before multi-threaded
DAG landed to master.
This needed to tweak depsgraph a bit so now dag_check_cycle() sets
is_acyclic field of DAG forest if there are cycles in the graph.
TODO: It might be possible to save some time on evaluation when
all the tagged objects were updated in multi-threaded DAG
traversal.
|
|
This is a regression since threaded dependency graph landed to master.
Root of the issue goes to the loads of graph preparation being done
even if there's nothing to be updated.
The idea of this change is to use ID type recalc bits to determine
whether there're objects to be updated. Generally speaking, we now
check object and object data datablocks with DAG_id_type_tagged()
and if there's no such IDs tagged we skip the whole task pool creation
and so,
The only difficult aspect was that in some circumstances it was possible
that there are tagged objects but nothing in ID recalc bit fields.
There were several different circumstances when it was possible:
* When one assigns object->recalc flag directly DAG flush didn't
set corresponding bits to ID recalc bits. Partially it is fixed
by making it so flush will set bitfield, but also for object
types there's no reason to assign recalc flag directly. Using
generic DAG_id_type_tag works almost the same fast as direct
assignment, ensures all the bitflags are set properly and for the
long run it seems it's what we would actually want to.
* DAG_on_visible_update() didn't set recalc bits at all.
* Some areas were checking for object->recalc != 0, however it is was
possible that object recalc flag contains PSYS_RECALC_CHILD which
was never cleaned from there.
No idea why would we need to assign such a flag when enabling
scene simplification, this is to be investigated separately.
* It is possible that scene_update_post and frame_update_post handlers
will modify objects. The issue is that DAG_ids_clear_recalc is called
just after callbacks, which leaves objects with recalc flags but no
corresponding bit in ID recalc bitfield. This leads to some kind of
regression when using ID type tag fields to check whether there objects
to be updated internally comparing threaded DAG with legacy one.
For now let's have a workaround which will preserve tag for ID_OB
if there're objects with OB_RECALC_ALL bits. This keeps behavior
unchanged comparing with 2.69 release.
|
|
This solves threading conflict which happens when having
multiple objects using Curve Deform modifier with the same
curve datablock. This conflict was caused by the fact that
curve_deform_verts() used to temporary override curve's
flags to make it path is there.
Actually, it was setting CU_FOLLOW flag temporary which
was only used where_on_path() (only in terms that this
temporary assignment only affected this function) but it
is now commented out for a while, so no reason to set
this flag temporary, If it's ever to be done, we'll need
to pass flags as an additional function argument.
For the path creation i've extended DegNode structure
which now holds extra bits which indicates what additional
data depending on the graph topology is to be evaluated.
Currently this is only used to indicate that curve needs
path to be evaluated regardless to cu->flag state. This
is so Curve Deform modifier is always happy.
In the future this flag might also be used to indicate
whether bmesh verts are to update (see recent commit to
3-vertex parent crash fix) or to indicate that the object
is the motherball etc.
|
|
This goes back to ancient era again and such a call isn't
safe for threading and really DAG is to make it sure display
list for dependencies is always there.
|
|
It was some kind of workaround for DAG glitch in 2009
(commit hash 8c5c7ebb0) and according to the comment
was needed to make select outline show immediately.
After some tests it appears DAG behaves almost fine now
(just needed to make it so layer is flushed properly to
the set scene) and no reason to have rather confusing
call in the code.
|
|
DAG node tagging was rather an experiment to make derived render working.
However, it ended up in a whole can of worms and need to be re-considered.
It is likely that regular object update tagging and scene update routines
are to be used for this.
Meanwhile no need to keep extra field in dag node. Would save us the whole
byte of the struct which we can use for other purposes meanwhile.
|
|
|
|
Issue was caused by missing objects update for temporary
freestyle objects. This happened because of the fact that
such objects doesn't have any relations, as in they're
corresponding to root nodes in the DAG.
This situation wasn't handled by DAG_threaded_update_begin()
which considered there's only one root node in the DAG.
|
|
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.
Technical details:
- Uses task scheduler which was recently committed to trunk
(that one which Brecht ported from Cycles).
- Added two utility functions to dependency graph:
* DAG_threaded_update_begin, which is called to initialize threaded
objects update. It will also schedule root DAG node to the queue,
hence starting evaluation process.
Initialization will calculate how much parents are to be evaluation
before current DAG node can be scheduled. This value is used by task
threads for faster detecting which nodes might be scheduled.
* DAG_threaded_update_handle_node_updated which is called from task
thread function when node was fully handled.
This function decreases num_pending_parents of node children and
schedules children with zero valency.
As it might have become clear, task thread receives DAG nodes and
decides which callback to call for it.
Currently only BKE_object_handle_update is called for object nodes.
In the future it'll call node->callback() from Ali's new DAG.
- This required adding some workarounds to the render pipeline.
Mainly to stop using get_object_dm() from modifiers' apply callback.
Such a call was only a workaround for dependency graph glitch when
rendering scene with, say, boolean modifiers before displaying
this scene.
Such change moves workaround from one place to another, so overall
hackentropy remains the same.
- Added paradigm of EvaluaitonContext. Currently it's more like just a
more reliable replacement for G.is_rendering which fails in some
circumstances.
Future idea of this context is to also store all the local data needed
for objects evaluation such as local time, Copy-on-Write data and so.
There're two types of EvaluationContext:
* Context used for viewport updated and owned by Main. In the future
this context might be easily moved to Window or Screen to allo
per-window/per-screen local time.
* Context used by render engines to evaluate objects for render purposes.
Render engine is an owner of this context.
This context is passed to all object update routines.
Reviewers: brecht, campbellbarton
Reviewed By: brecht
CC: lukastoenne
Differential Revision: https://developer.blender.org/D94
|
|
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
|
|
proxy group.
|
|
Depsgraph would only consider one level, now it works recursive.
|
|
This means it's possible now to snap stuff to
reconstructed tracks positions.
|
|
I know this is not so much nice to have this guys hanging
around in a general Object datablock and ideally they better
be wrapped around into a structure like DerivedMesh or
something like this. But this is pure runtime only stuff and
we could re-wrap them around later.
Main purpose of this is making curves more thread safe,
so no separate threads will ever start freeing the same path
or the same bevel list.
It also makes sense because path and bevel shall include
deformation coming from modifiers which are applying on
pre-tesselation point and different objects could have
different set of modifiers. This used to be really confusing
in the past and now data which depends on object is stored
in an object, making things clear for understanding even.
This doesn't make curve code fully thread-safe due to
pre-tesselation modifiers still modifies actual nurbs and
lock is still needed in makeDispListsCurveTypes, but this
change makes usage of paths safe for threading.
Once modifiers will stop modifying actual nurbs, curves
will be fully safe for threading.
Actually, this commit also contains wrapping runtime curve
members into own structure
This allows easier assignment on file loading, keeps curve-
specific runtime data grouped and saves couple of bytes in
Object for non-curve types.
--
svn merge -r57938:57939 ^/branches/soc-2013-depsgraph_mt
svn merge -r57957:57958^/branches/soc-2013-depsgraph_mt
|