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
2018-08-13Fix dependency graph for constraints depending on B-Bone shape.Alexander Gavrilov
Some constraints have an option to take the final bezier shape of the target B-Bone into account. This shape usually depends on two other bones in addition to the target itself, so the graph should include the relevant dependencies. Reviewers: sergey Differential Revision: https://developer.blender.org/D3591
2018-07-31Fix T56170: Fake dependency cycle in new depsgraph + interleaved armature ↵Sergey Sharybin
update + proxy Make proxy copy result more atomic operation.
2018-07-31Respect ID user count when creating pose on object copySergey Sharybin
This solves wrong user counter of custom shape when duplicating bone few times and then undoing all the duplications.
2018-07-20Fix T55973: [2.8] Crash when 'apply pose as rest pose' when bone scale is 0,0,0.Bastien Montagne
`BKE_pose_rebuild()` should (ideally) always trigger a rebuild of the depsgraph, since it can add or remove posechannels. This function now takes a Main parameter to ensure that related depsgraphes are tagged as dirty (kept it optional, for some corner cases). We should also probably double-check calls to that function, think in theory it should only be called from depsgraph itself? But for now...
2018-06-29Merge branch 'master' into blender2.8Campbell Barton
2018-06-29Cleanup: trailing newlinesCampbell Barton
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-05-08Cleanup: whitespace, duplicate includesCampbell Barton
2018-05-03Depsgraph: Make sure evaluated pose channels are pointing to evaluated bonesSergey Sharybin
2018-04-30Cleanup: Move FOREACH_PCHAN_*_IN_OBJECT_*() macros to BKE_armature.hJoshua Leung
This reduces the number of headers we need to import (and/or dependencies on the order of them), as these depend on PBONE_VISIBLE(), which is already in BKE_armature.h
2018-04-16Depsgraph: remove EvaluationContext, pass Depsgraph instead.Brecht Van Lommel
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
2018-04-04Merge branch 'master' into blender2.8Sergey Sharybin
2018-04-04Depsgraph: Only bind ID-data and indices to depsgraph callbacksSergey Sharybin
This is a part of copy-on-write sanitization, to avoid all the checks which were attempting to keep sub-data pointers intact. Point is: ID pointers never change for CoW datablocks, but nested data pointers might change when updating existing copy. Solution: Only bind ID data pointers and index of sub-data. This will make CoW datablock 7update function was easier in 2.8. In master we were only using pose channel pointers in callbacks, this is exactly what this commit addresses. A linear lookup array is created on pose evaluation init and is thrown away afterwards. One thing we might consider doing is to keep indexed array of poses, similar to chanhash. Reviewers: campbellbarton Reviewed By: campbellbarton Subscribers: dfelinto Differential Revision: https://developer.blender.org/D3124
2017-09-25Merge branch 'master' into blender2.8Sergey Sharybin
2017-09-25Fix T52835: When driven IK influence change, ik animation have 1 frame delaySergey Sharybin
2017-08-16Pass EvaluationContext instead of bContextCampbell Barton
2.8x branch added bContext arg in many places, pass eval-context instead since its not simple to reason about what what nested functions do when they can access and change almost anything. Also use const to prevent unexpected modifications. This fixes crash loading files with shadows, since off-screen buffers use a NULL context for rendering.
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-07-21Pass EvaluationContext argument everywhereLuca Rood
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.
2017-06-14Merge branch 'master' into blender2.8Bastien Montagne
2017-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2017-06-07Manipulators: lamp, camera & force-fieldCampbell Barton
From custom-manipulators branch. These may be improved they work on a basic level.
2017-04-18Merge remote-tracking branch 'origin/master' into blender2.8Dalai Felinto
2017-04-18Depsgraph: Use proper scene to get frame from for pose constraints evaluaitonSergey Sharybin
Spotted by Luca, thanks!
2017-01-24Depsgraph: Remove special version of pose builderSergey Sharybin
2016-11-07Depsgraph: Speedup initial rig build timeSergey Sharybin
We don't need to sort bone channels, it's all taken care about by the depsgraph itself. Gives up to 30% initial rig construction time speedup.
2016-07-21Fix (unreported) crash in some case when remapping armature data.Bastien Montagne
Those bone pointers in object's pose bite again - turns out they can be accessed before pose actually gets rebuilt in some cases (e.g. from undo writefile), so we need to clear the pointers immediately.
2016-07-21Refactor/deduplicate even more make_local code (and fix part of T48907).Bastien Montagne
Turns out most BKE_foo_make_local datablock-specific functions are actually doing exactly the same thing, only two currently need special additional operations (object and brush ones). So added a BKE_id_make_local_generic instead of copying same code over and over. Also, changed a bit how make_local works in case we are localizing a whole library. We need to do the 'remap' step (from old linked ID to new local one) in the second loop, otherwise we miss some dependencies. This fixes main part of T48907.
2016-07-14Add option to id_make_local to force localization of datablock, even if not ↵Bastien Montagne
used locally. Will be used by link/append code.
2016-07-10Refactor/enhance BKE_material_make_local() and BKE_image_make_local().Bastien Montagne
Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10Cleanup/Refactor: pass Main pointer to all ID copy functions.Bastien Montagne
Also allows us to get rid of a few _copy_ex() versions...
2016-05-17Bendy Bones: Advanced B-Bones for Easier + Simple RiggingJoshua Leung
This commit/patch/branch brings a bunch of powerful new options for B-Bones and for working with B-Bones, making it easier for animators to create their own rigs, using fewer bones (which also means hopefully lighter + faster rigs ;) This functionality was first demoed by Daniel at BConf15 Some highlights from this patch include: * You can now directly control the shape of B-Bones using a series of properties instead of being restricted to trying to indirectly control them through the neighbouring bones. See the "Bendy Bones" panel... * B-Bones can be shaped in EditMode to define a "curved rest pose" for the bone. This is useful for things like eyebrows and mouths/eyelids * You can now make B-Bones use custom bones as their reference bone handles, instead of only using the parent/child bones. To do so, enable the "Use Custom Reference Handles" toggle. If none are specified, then the BBone will only use the Bendy Bone properties. * Constraints Head/Tail option can now slide along the B-Bone shape, instead of just linearly interpolating between the endpoints of the bone. For more details, see: * http://aligorith.blogspot.co.nz/2016/05/bendy-bones-dev-update.html * http://aligorith.blogspot.co.nz/2016/05/an-in-depth-look-at-how-b-bones-work.html -- Credits -- Original Idea: Daniel M Lara (pepeland) Original Patch/Research: Jose Molina Additional Development + Polish: Joshua Leung (aligorith) Testing/Feedback: Daniel M Lara (pepeland), Juan Pablo Bouza (jpbouza)
2016-01-09Readfile: use hash lookup for bonesCampbell Barton
Bone loop for reconstructing links was O(n^2)
2015-09-04Armature: Cheap edit-to-object mode speedup.Bastien Montagne
`fix_bonelist_roll()` is already recursive, and was calling recursive `BKE_armature_where_is_bone()` twice! Changed `BKE_armature_where_is_bone()` to controll whether we recurse over children or not. With full Victor's rig, we gain 16% in `ED_armature_from_edit()` (from 31ms to 26ms). With a dummy test-case 100 bones chain, we gain 80% in `ED_armature_from_edit()` (from 1.25ms to 0.25ms). Not crucial, but still worth it. ;)
2015-09-03View-Selected: use custom bones boundboxCampbell Barton
Support using custom pose-bone transform and object when calculating view bounds.
2015-05-12Cleanup: styleCampbell Barton
2015-05-12Depsgraph: Add evaluation callbacks for granular nodes updateSergey Sharybin
This commit only adds callbacks which then later be used with major dependency graph commit, keeping the upcoming commit more clean to follow. Should be no functional changes so far still.
2015-05-12Depsgraph: Move update-related functions into own filesSergey Sharybin
Currently it is just moving existing functions into a new file, but in the future those new files will be grown much more due to upcoming more granular scene updates. Should be no functional changes.
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-03-04Fix for snap to cursor /w parents (object/pose)Campbell Barton
Also don't use pose-bone transform unless the user is in pose-mode.
2014-05-21Fix T40271: recalculation of the bone roll does not work correctly.Bastien Montagne
Check that up_axis is not aligned with bone was wrong in at least two aspects (not working against negative alignement case, and since ages it seems, using Z axis when bones are along Y axis...). Also optimized a bit here, better to have a normalized version of vec_roll_to_mat3(), since it needs normalized vector anyway, and we have to normalize it for the tests before calling it anyway (so now, we only do that twice in Transform code, instead of three times). And we can perform aling test *before* calling vec_roll_to_mat3!
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2013-08-19Made armatures evaluation safe for threadingSergey Sharybin
Apparently, some routines in armature deformation code were using static arrays. This is probably just an optimization thing, but it's very bad for threading. Now made it so bbone matrices array is allocating in callee function stack. This required exposing MAX_BBONE_SUBDIV to an external API, This is not so much crappy from code side, and it shall be the same fast as before. -- svn merge -r58278:58279 ^/branches/soc-2013-depsgraph_mt
2013-08-17change CHECK_TYPE_INLINE macro not to add the pointer in the macro.Campbell Barton
2013-02-05Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashesSergey Sharybin
Issue was caused by couple of circumstances: - Normal Map node requires tesselated faces to compute tangent space - All temporary meshes needed for Cycles export were adding to G.main - Undo pushes would temporary set meshes tessfaces to NULL - Moving node will cause undo push and tree re-evaluate fr preview All this leads to threading conflict between preview render and undo system. Solved it in way that all temporary meshes are adding to that exact Main which was passed to Cycles via BlendData. This required couple of mechanic changes like adding extra parameter to *_add() functions and adding some *_ex() functions to make it possible RNA adds objects to Main passed to new() RNA function. This was tricky to pass Main to RNA function and IMO that's not so nice to pass main to function, so ended up with such decision: - Object.to_mesh() will add temp mesh to G.main - Added Main.meshes.new_from_object() which does the same as to_mesh, but adds temporary mesh to specified Main. So now all temporary meshes needed for preview render would be added to preview_main which does not conflict with undo pushes. Viewport render shall not be an issue because object sync happens from main thread in this case. It could be some issues with final render, but that's not so much likely to happen, so shall be fine. Thanks to Brecht for review!
2012-12-11define the size of matrix args for both rows/cols.Campbell Barton
2012-10-15code cleanup: define sizes of vectors for function args and use C style commentsCampbell Barton
2012-10-07add type checking for more error prone macros.Campbell Barton
2012-10-05fix for circle select ignoring lock selection option for pose and edit ↵Campbell Barton
modes, added macros PBONE_SELECTABLE, EBONE_SELECTABLE