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
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-05-15Cleanup: warnings, styleCampbell Barton
2017-05-05Add check (error message + assert) that pose is valid in armature evaluation.Bastien Montagne
Not sure how this happens, but in some cases we can evaluate deformations of an armature which pose is not valid, at least put a warning here to help identifying the issue quickly.
2017-02-06Use hash instead of linear lookup in armature deformSergey Sharybin
This avoids calling linear lookup 100s of time when dealing with real-life character. Still some tweaks possible.
2017-01-21Fix T49527: Blender stalls when changing armature ghosting range with ↵Joshua Leung
stepsize = 0 A big thanks to Steffen Mortensen (stifan) for finding the root cause of this bug!
2016-11-15Revert "Proxy: Construct pchan hash when syncing armature proxy"Sergey Sharybin
This reverts commit 9b5a32cbfb8a8565202bdccd232c53f98b62eeec. Apparently it is possible to have other thread mocking around with the hash. Needs deeper investigation, for the time being reverting to prevent crashes.
2016-11-11Fix crash happening in some cases with MakeLocal operator.Bastien Montagne
Culprit here was once more proxies. Think what was happening here was: 1) Both proxy and proxified armatures' PoseChannels were cleared (needed after remapping due to Bone pointers being stored in pchans). 2) Proxy PoseChannels got rebuilt in `BKE_pose_rebuild_ex()`, which ends, in proxy cases, by actually replacing rebuilt pchans by those from the proxified object... which has not yet been rebuilt. Fixed the issue by merely adding bone pointer to data copied from original pchan into new 'from proxy' one... Sounds much, much safer and sanier anyway, that way we can be sure bone pointer is actually pointing to a bone of the object's armature (this is supposed to be the same Armature datablock between proxy and proxified objects, but that may not be always true especially during makelocal process).
2016-11-07Proxy: Construct pchan hash when syncing armature proxySergey Sharybin
This makes bone lookup much faster (by avoiding liner string lookup) and speeds up depsgraph construction time on file open.
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-25Cleanup: factorize the 'ensure local' part of datablock copy into a single ↵Bastien Montagne
BKE_id_copy_ensure_local function.
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-11Remove usercount handling from BKE_id_expand_local.Bastien Montagne
Idea looked good, but we have too much custom situations here (some half-fake-sub-ID being copied with their 'owner', animdata, etc.), let's let datablock copy functions handle that themselves. Also allows to safely call BKE_id_expand_local from all copy functions now (only when copying linked data).
2016-07-11Cleanup: remove call to BKE_id_lib_local_paths() in make_local functions.Bastien Montagne
This one is already called by matching copy functions, no need to call it twice!
2016-07-11Use new generic BKE_id_expand_local() for both make_local() and copy() ↵Bastien Montagne
functions of obdata (armature, mesh, curve, mball, lattice, lamp, camera, and speaker). This greatly simplifies said code, once again no change expected from user PoV.
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-07-06Replace of (id->lib != NULL) check by meaningful macro.Bastien Montagne
Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly, to easily change it (see work done in asset-engine branch). Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer, and not a check whether ID is linked or not. Will have a closer look at it later. Reviewers: campbellbarton, brecht, sergey Differential Revision: https://developer.blender.org/D2082
2016-06-27Bendy Bones Instability Fix - Second AttemptJoshua Leung
So the error seems to be in cubic_tangent_factor_circle_v3(), which was introduced with D2001. I've tweaked the most obvious culprit here - the epsilon factor. It used to be 10^-7, but I've reduced it down to 10^-5 now, and it's looking a lot more stable now :) --------- BTW, about the derivation of the magic 0.390464 factor I briefly subbed back as a workaround for this bug, see: http://www.whizkidtech.redprince.net/bezier/circle/
2016-06-27Bendy Bones: Temporary workaround for instability caused by D2001 when using ↵Joshua Leung
custom handle bones It's probably some numeric precision issue, but until we figure out exactly what's going wrong here, let's just revert back to the hardcoded value that was used here successfully for years without issues.
2016-06-22ID-Remap - Step one: core work (cleanup and rework of generic ID datablock ↵Bastien Montagne
handling). This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock was pretty much impossible, except for a few special cases. Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite a few ID usages were missed or wrongly handled that way). One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling by using library_query utils to allow generic handling of those, which is now the case (now, generic ID links handling is only "knwon" from readfile.c and library_query.c). This commit also adds backends to allow live replacement and deletion of datablocks in Blender (so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one, or NULL one in case of unlinking). This will allow nice new features, like ability to easily reload or relocate libraries, real immediate deletion of datablocks in blender, replacement of one datablock by another, etc. Some of those are for next commits. A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core. Though it was tested rather deeply, being totally impossible to check all possible ID usage cases, it's likely there are some remaining issues and bugs in new code... Please report them! ;) Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2016-05-23B-Bones improve handle calculationCampbell Barton
This changes the bezier handles b-bones to fit to a circle more closely.
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-05-13Armature meshdeform evaluation: parallelize computation of bbones deform ↵Bastien Montagne
matrices. On big and complex rigs like blendrig or koro, it can give up to ~10% more FPS in best cases. Hard to tackle all cases in tests though, so please report any unexpected slowdown in armature animation playback!
2016-04-25Cleanup: use boolCampbell Barton
2016-04-25Fix T48263: Armature modifier crash w/ non-armature objectsCampbell Barton
2016-03-04Fix uninitialized memory use lattice-boundboxCampbell Barton
Many other places weren't clearing boundbox dirty flag after calculation.
2016-01-09Readfile: use hash lookup for bonesCampbell Barton
Bone loop for reconstructing links was O(n^2)
2016-01-07Fix error in recent commitCampbell Barton
2016-01-07Fix access possibly uninitialized armature's bounding box flagSergey Sharybin
2015-11-09Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.Bastien Montagne
We have callbacks for that, they also do some checks and help ensure things are done correctly. Only place where this is assumed not true is blenloader (since here we may affect refcount of library IDs as well...).
2015-10-23BLI_math: add mat3_normalized_to_* functionsCampbell Barton
Many uses of matrices for rotation keep them normalized, so no need to normalize each time.
2015-09-21Armature drawing: custom shape scale optionsCampbell Barton
- Custom scale: Avoids having multiple custom-shapes at different sizes. - Option not to use bones length: So changes in edit-mode don't resize the custom-shape.
2015-09-21Fix view-selected w/ custom bone shapesCampbell Barton
Was ignoring bone-length, also check that drawing shapes is enabled.
2015-09-04Cleanup: Better to assert over bad condition (which shall never happen ↵Bastien Montagne
anyway), than just return with un-initialized mat...
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-09-01Assert vec_roll_to_mat3_normalized's gets a normalized vectorCampbell Barton
2015-08-13Add real boundbox support to lattice, and update armature one.Philipp Oeser
* draw lattice boundingboxes in 3dView [if "show_bounds" is used -- an option previously pretty useless for lattices] * give proper values for lattice objects ".bound_box" in bpy * give proper values for armature objects ".bound_box" in bpy * lets users use "Dimensions" [in 3dView Transform panel] on lattices and armatures * remove redundant calculations in "boundbox_armature()" Armatures boundingboxes were already drawn in 3dView, if "show_bounds" was used. Based on report T45735: Lattice's bounding_box doesn't update, and a comment in code by @campbellbarton ("later we may want to add dimensions for lattice, armature etc too"). Revision: https://developer.blender.org/D1460
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-04-04Cleanup: use float math funcsCampbell Barton
2015-04-04Cleanup: use BKE_animdata_* prefixCampbell Barton
2015-03-30Cleanup: use const for typeinfoCampbell 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.
2015-01-31Compiler warning: double-promotionCampbell Barton
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2015-01-15Bugfix: Wrong flags used in Spline IK eval for bounds limitsJoshua Leung