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
AgeCommit message (Collapse)Author
2014-10-06Texture painting:Antony Riakiotakis
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.
2014-09-08Fix T41703: Blender crashes trying to load character file.Bastien Montagne
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! :)
2014-09-03Texture painting:Antony Riakiotakis
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.
2014-08-27Changing render engine now refreshes the texture paint display better.Antony Riakiotakis
Also avoid looping over all objects for texture paint checks when a material changes, only check active object.
2014-08-27Only calculate texture paint slots from mtex if renderer is blenderAntony Riakiotakis
internal. This should eliminate some confusion when people use external render engines.
2014-07-31Style cleanupCampbell Barton
2014-07-21Fix T40839: Object Font Text Rendering BugSergey Sharybin
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().
2014-07-21GSOC 2013 paintAntony Riakiotakis
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.
2014-07-19Defines: replace ELEM3-16 with ELEM(...), that can take varargsCampbell Barton
2014-07-18Fix T41109: Reloading image that has been modified outside Blender does not ↵Sergey Sharybin
update image in Image Texture nodes
2014-07-01Fix T40556: Curve Modifier does not work when used in a Background sceneSergey Sharybin
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.
2014-05-09Code cleanup: styleCampbell Barton
2014-05-08Removed a Freestyle hack for DAG updates introduced in commit rBae58968e0a61.Tamito Kajiyama
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
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-11API Cleanup: Use BKE_constraint prefix for constraint apiCampbell Barton
2014-04-04Fix crash happening in DAG_pose_sort() due to threading issuesSergey Sharybin
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'.
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-25Fix T38824: curve which is constrained on a hidden layer causes cycles crashSergey Sharybin
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.
2014-02-22Code cleanup: styleCampbell Barton
2014-02-19Code cleanup: styleCampbell Barton
2014-02-18Fix T38691: Curve object bevel not working in group instanceSergey Sharybin
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
2014-02-14Fix for crash caused by effectors doing precalculation //during// DAGLukas Tönne
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.
2014-02-07ListBase API: add utility api funcs for clearing and checking emptyCampbell Barton
2014-02-05Add debug print to ID update taggingSergey Sharybin
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-23Fix T38337: Crash when calling to_mesh() on a Curve object after clearing ↵Sergey Sharybin
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.
2014-01-23Fix crash when changing space type to 3D space when having multiple windowsSergey Sharybin
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.
2014-01-20Followup for 1728c1e: we don't need to replace flags at allSergey Sharybin
Replacing the flags isn't thread safe and could lead to bi troubles. Such things are to be handled by the dependency graph.
2014-01-17Followup to d03e768: was wrongly (void) non-existing argumentSergey Sharybin
2014-01-17Fix T38260: Missing object update with two visible scenesSergey Sharybin
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.
2014-01-17Code Cleanup: spellingCampbell Barton
2014-01-16Tweak to early threaded update escapeSergey Sharybin
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.
2014-01-15Eek, terrible typo in previous commitSergey Sharybin
Pointed by Bastien!
2014-01-15Fix T38224: Blender crashes on duplicating curveSergey Sharybin
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.
2014-01-15Fix T38216: Cycles render crash Blender in some scene in versionsSergey Sharybin
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.
2014-01-14Empties with Images draw type: add support for movies and image sequencesGeoffroy Krantz
This adds an ImageUser to such empties with all the typical settings. Reviewed By: brecht, campbellbarton Differential Revision: https://developer.blender.org/D108
2014-01-13Fix T38139: Objects which are in cyclic dependency are not updatedSergey Sharybin
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.
2014-01-13Fix T38054: High CPU usage with many objectsSergey Sharybin
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.
2014-01-13Remove direct displist creation from curve deformSergey Sharybin
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.
2014-01-13Remove direct displist creation from BKE_vfont_to_curve_ex()Sergey Sharybin
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.
2014-01-13Remove direct displist creation from drawing codeSergey Sharybin
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.
2014-01-09Code cleanup: remove WIP code came from the GSoC branchSergey Sharybin
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.
2013-12-30Main API: refactor naming, use BKE_main_ prefix and add main arg.Campbell Barton
2013-12-27Fix T37955: Freestyle render misalignmentSergey Sharybin
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.
2013-12-26Threaded object update and EvaluationContextSergey Sharybin
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
2013-11-25Code Cleanup: rename vars for detecting change to be more consistentCampbell Barton
rename change/is_change/is_changed/modified -> changed also use bools over int/short/char and once accidental float.
2013-09-24Fix #36793: missing update on undo with proxy object that is not using a ↵Brecht Van Lommel
proxy group.
2013-09-18Fix #36754: animation not evaluated on object two levels down in dupligroups.Brecht Van Lommel
Depsgraph would only consider one level, now it works recursive.
2013-09-09Enable vertex snapping to bundle positionsSergey Sharybin
This means it's possible now to snap stuff to reconstructed tracks positions.
2013-08-19Move bevel list and path from Curve to Object datablockSergey Sharybin
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