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-09-06Use normalized project functionsCampbell Barton
2017-08-29Fix T48079: Maintain Volume constraint overcompensates.Alexander Gavrilov
The coefficient has been wrong since introduction for some reason. Not backwards compatible, should not be merged to 2.7*.
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-06-12Cleanup: indentation, long linesCampbell Barton
2017-04-26Alembic: fixed refcount issue when duplicating imported objectsSybren A. Stüvel
Duplicating an imported object didn't increment the cache reader's refcount, whereas removing the duplicate did decrement it. This caused problems.
2017-04-26Fix T51280: Alembic: Crash when removing cache modifierSybren A. Stüvel
The calls to id_us_plus/min were unnecessary (and caused assertion failures) as this is already taken care of by transformcache_id_looper().
2017-01-16Cleanup/refactor: Add new BLI_string_util.Bastien Montagne
Things like `BLI_uniquename` had nothing, but really nothing to do in BLI_path_util files! Also, got rid of length limitation in `BLI_uniquename_cb`, we can use alloca here to avoid overhead of malloc while keeping free size (within reasonable limits of course).
2016-12-08Fix crash when opening a Blender file containing Alembic data.Kévin Dietrich
Was also affecting object linking.
2016-11-21Cleanup: get rid of unused `BKE_constraints_relink()`.Bastien Montagne
Libquery/generic ID remapping code handles this now.
2016-10-30Fix compile errors for when WITH_ALEMBIC is OFF.Kévin Dietrich
2016-10-29Alembic: store a pointer to the object reader in the cache modifiers andKévin Dietrich
constraints. This avoids traversing the archive everytime object data is needed and gives an overall consistent ~2x speedup here with files containing between 136 and 500 Alembic objects. Also this somewhat nicely de- duplicates code between data creation (upon import) and data streaming (modifiers and constraints). The only worying part is what happens when a CacheFile is deleted and/or has its path changed. For now, we traverse the whole scene and for each object using the CacheFile we free the pointer and NULL-ify it (see BKE_cachefile_clean), but at some point this should be re-considered and make use of the dependency graph.
2016-08-26Fix cache constraint not reference counting cache files.Kévin Dietrich
2016-08-26Fix T49168: crash when evaluating a cache constraint with a NULL cacheKévin Dietrich
file.
2016-08-06Basic Alembic supportKévin Dietrich
All in all, this patch adds an Alembic importer, an Alembic exporter, and a new CacheFile data block which, for now, wraps around an Alembic archive. This data block is made available through a new modifier ("Mesh Sequence Cache") as well as a new constraint ("Transform Cache") to somewhat properly support respectively geometric and transformation data streaming from alembic caches. A more in-depth documentation is to be found on the wiki, as well as a guide to compile alembic: https://wiki.blender.org/index.php/ User:Kevindietrich/AlembicBasicIo. Many thanks to everyone involved in this little project, and huge shout out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the custom builds and compile fixes. Reviewers: sergey, campbellbarton, mont29 Reviewed By: sergey, campbellbarton, mont29 Differential Revision: https://developer.blender.org/D2060
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-07-04Fix a few compiler warnings on OS X / clang.Brecht Van Lommel
Two were actual bugs, though they existed only in unused code: * In Freestyle it was unintentionally copying a scene rather than referencing it. * In BLI_array_store_is_valid there was use of uninitialized memory.
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-10Avoid per-constraint-target call of strlenSergey Sharybin
It's enough to do one single comparison to see if the string is empty or not.
2016-05-10Optimize action constraint by avoid memory allocationSergey Sharybin
2016-04-26Fix T48176: Shrinkwrap crashes when multiple objects uses same targetSergey Sharybin
Annoying bug caused by temp nature of looptri layer for CCGDM. Fixed in a similar to CCG loops by using lock when allocating and filling looptri arrays. Real fix would be to make sure this array is allocated on object evaluation using DAG's eval_flag, but that's more involved change which we'll work on later.
2016-01-12Fix T47164: [Scene.raycast] - True result when it should be False.Bastien Montagne
We cannot use FLT_MAX as initi distance for raycast... Renamed TRANSFORM_DIST_MAX_RAY to BVH_RAYCAST_DIST_MAX, moved it into BLI_kdopbvh, and use in RNA raycast callbacks (and all other places using that API).
2015-11-23Cleanup: shadowing (blenkernel)Campbell Barton
2015-10-26Fix T46599: Copy Rotation behaves erratically when Use Y is disabledJoshua Leung
When the "Use Y" option in the Copy Rotation constraint is disabled, the constraint behaves eratically when rotating all the target on all axes at the same time. This is partially to be expected due to the way that euler rotations work (i.e. the rotation orders stuff - you should use a rotation order based on most to least important/significant rotations). Hence, by locking Y, you're causing accuracy problems for Z. What was not expected though was that changing the rotation orders on the objects involved (for the record, it's the constraint owner that counts) did nothing. It turns out that for objects, the rotation order settings were getting ignored! This commit fixes this problem, and this particular case can be resolved by using "XZY". Notes: * Since all object constraints were previously working on the assumption that they used XYZ (default) order, it is possible that this change may have the unintended consequence of changing the behaviour of some rigs which relied on the buggy behaviour. Hopefully this will be a rare occurrence.
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-10-09Fix T46418: Constraints - influence other than 0 or 1 - bad results with ↵Bastien Montagne
non-homogeneous scaled matrices. Use new interp_m4_m4m4 instead of blend_m4_m4m4. Note that maybe we could replace other usages of blend_m... by interp_m..., but this should be investigated on a case-by-case basis.
2015-09-18Use squared length where possibleCampbell Barton
2015-08-21BVH-raycast: ensure input direction is unit-lengthCampbell Barton
This was already the case for most users of ray-cast. Doing this avoids 2x normalize calls per ray-cast in many places.
2015-08-18Refactor translation code out of blenfontCampbell Barton
- Add blentranslation `BLT_*` module. - moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`). - moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-07-23Use looptri for BVH raycast (simple cases)Campbell Barton
2015-07-13Fix T45394: Motion tracking constraints did not work with Cycles motion blurSergey Sharybin
2015-03-30Cleanup: use const for typeinfoCampbell Barton
2015-03-06Fix access freed memory when doing constraints ID counter on main freeSergey Sharybin
Basically just made constraints free function aware of possible do_id_users argument, same as we've got for objects, object data and so on.
2015-02-18Fix free'd memory use removing constraintCampbell Barton
2015-02-11Outliner: ContextMenus for constraints/modifiersCampbell Barton
Context menu to toggle render, visibility & delete D996 by @lichtwerk
2015-01-31Compiler warning: double-promotionCampbell Barton
2015-01-13Fixes for SplineIK:Joshua Leung
* Ensure that when new constraints are created, the new settings have sensible default values. TODO: we need to version-patch old files * Fix problem with variable shadowing (which wasn't causing problems AFAIK)
2015-01-13Bugfix: The "bulge_min" setting for the Stretch To constraint prevented ↵Joshua Leung
bones from shrinking below 1.0 scale From the looks of things, this was a typo. The result was that if you had a bone with the minimum volume restriction in place, the bone would not get any thinner when it was stretched out.
2015-01-11Fix T43204: Shrinkwrap constraint, project mode: Space ignored in bone case.Bastien Montagne
Own fault in rBb154aa8c060a60d to fix T42447... Reverted that commit, and added kind of not-so-nice hack instead. Note root of the issue comes from the special case we are doing here re 'Local' space of parent-less objects. In that case, local space should be the same as world one, but instead we apply the object rotation to it... This is inconsistent with all other cases and could very well lead to other issues as T42447, but afraid fixing that properly would be rather hairy - not to mention it would likely break all existing riggings etc. :( Should be safe for a 2.73a, shall we need it.
2014-12-01Cleanup: more int->bool.Bastien Montagne
2014-11-24BLI_utildefines: add UNUSED_VARS() macroCampbell Barton
2014-10-31Fix T42447: Shrinkwrap constraint: mismatch in handling sclaing in ↵Bastien Montagne
projection case. Constraint space conversion ignores object scale, which is OK in most cases. But here, we are converting a normal from world to local space, and when later converting it into target space to actually do the BVH raycast, we use TransformSpace which does applies objects' scaling to normals, as expected. Best solution here is to also take object's scale into account when converting from local to world space.
2014-10-16Fix T42256: Translation operator moves Child-Of constrained objects in wrong ↵Bastien Montagne
space when only using parent's rotation and parent is rotated. Just do not use crazyspace correction with childof constraints in this case. Note this is only a very partial fix (partial use of parent loc on some axes is still broken in transform), a real fix would probably require a full rewrite of constraints handling in transform code (a mere static correction matrix just cannot work in all possible cases, we'd need a full dynamic correction system here). Anyway, transform code as a whole is horrible. :/
2014-10-14Yet another tweak to stretch volume variation.Lukas Tönne
Make sure the 1.0 value is not affected by smoothing, and min/max limits never go above or below 1.0 respectively. This was a request by animators since not modifying the mesh in its rest pose is regarded as crucial.
2014-10-14Tweak for smoothing limits in stretch-constraint volume preservation.Lukas Tönne
Uses a arctan instead of sine function now, which has the advantage of not overestimating the bulging.
2014-10-13Integrated limits for volume preservation in stretch-to constraints.Lukas Tönne
Currently the volume variation feature in stretch constraints is unlimited. This has to be compensated by riggers by adding scale limit constraints, but these are unaware of the stretch orientation and can lead to flipping. Also the stretch calculation itself is not working properly and can lead to collapsing volume. The patch fixes this with several modifications: - Interpret the volume variation factor as exponent, which works better with large values for artistic purposes. - Add integrated limits to the volume "bulge" factor, so secondary constraints for compensation become unnecessary - Add a smoothness factor to make limits less visible. Eventually a generic volume preservation constraint would be nicer, because multiple constraints currently implement volume variation of their own. This feature could actually work very nicely independent from other constraint features. Differential Revision: https://developer.blender.org/D826
2014-09-24Cleanup: use float versions of functions when in/output are floatsCampbell Barton
2014-08-01Cleanup: Move SpaceTransform helpers from `BKE_shrinkwrap` to `BLI_math_matrix`.Bastien Montagne
2014-07-24Implement option to parent object to undistorted position of 2D trackSergey Sharybin
2014-07-21Math Lib: rename mul_serie_m3 to mul_m3_series & reorder argsCampbell Barton
Importantly, reversed mul_serie_m3 argument order (so it matches the m4 function)
2014-07-20Math Lib: use variable length args for mul_serie_m3,m4 (instead of trailing ↵Campbell Barton
NULL's)