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-27Math Lib: Add non-clamped round_* functionsCampbell Barton
Replace iroundf with round_fl_to_int, add other types
2017-09-21Fix T50450: Breakdowner doesn't work in Tweak Mode on translated NLA StripsJoshua Leung
2017-09-06Use normalized project functionsCampbell Barton
2017-08-11Object Apply Transform: option to apply propertiesCampbell Barton
In some cases users may want to disable this option to avoid changing other properties besides vertex locations.
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-11A bunch of fixes for Pose Library while checking on T51607Joshua Leung
* Display a warning above the pose list if the pose library is in an invalid state (i.e. when it has keyframes but no pose-markers associated with those keyframes). This warning prompts users to run the "Sanitize Pose Library Action" operator, which should fix up such issues. * "Sanitize" operator now creates unique names for each newly create pose marker it generates, including the frame on which it found the pose
2017-06-19Cleanup: doxygen commentsCampbell Barton
Also remove duplicate & mismatching comments from grease-pencil header. Keep comments close to implementation to avoid getting out of sync.
2017-05-19Cleanup: add braces for multi-line blocksCampbell Barton
2017-03-11Breakdowner - Constrain Transform and AxisJoshua Leung
This commit adds new features to the breakdowner, giving animators more control over what gets interpolated by the breakdowner. Specifically: "Just as G R S let you move rotate scale, and then X Y Z let you do that in one desired axis, when using the Breakdower it would be great to be able to add GRS and XYZ to constrain what transform / axis is being breakdowned." As requested here: https://rightclickselect.com/p/animation/csbbbc/breakdowner-constrain-transform-and-axis Notes: * In addition to G/R/S, there's also B (Bendy Bone settings and C (custom properties) * Pressing G/R/S/B/C or X/Y/Z again will turn these constraints off again
2017-03-093D View: wrap GPU_select cache callsCampbell Barton
Avoids including GPU_select and makes it more clear that the cache is needed for view3d_opengl_select calls. Also use typed enum for select mode.
2017-03-093D View: use cache for armature selectCampbell Barton
2017-03-083D View: new nethod of opengl selectionCampbell Barton
Intended to replace legacy GL_SELECT, without the limitations of sample queries which can't access depth information. This commit adds VIEW3D_SELECT_PICK_NEAREST and VIEW3D_SELECT_PICK_ALL which access the depth buffers to detect whats under the pointer, so initial selection is always the closest item. The performance of this method depends a lot on the OpenGL implementations glReadPixels. Since reading depth can be slow, buffers are cached for object picking so selecting re-uses depth data, performing 1 draw instead of 3 (for 24, 18, 10 px regions, picking with many items under the pointer). Occlusion queries draw twice when picking nearest, so worst case 6x draw calls per selection. Even with these improvements occlusion queries is faster on AMD hardware. Depth selection is disabled by default, toggle option under select method. May enable by default if this works well on different hardware. Reviewed as D2543
2017-03-08Rename BLI_rct*_init_pt_size -> radiusCampbell Barton
2017-03-05BLI_rect: add init from point functionsCampbell Barton
Initialize a rectangle from point+size.
2017-03-03Cleanup: redundant header, use const, short -> boolCampbell Barton
2017-03-01Cleanup: code-style, duplicate headerCampbell Barton
2017-02-04Remove flag: `SNAP_OBJECT_USE_CACHE` from snap_contextGermano Cavalcante
Since the cache is created in one way or another, this flag is not really making a difference More details here: D2496
2017-01-16Cleanup/refactor: move BKE_deform_flip_side_name & co to BLI_string_utilsBastien Montagne
Functions like that do not have anything to do in BKE really, even less when actually more used for bones than vgroups!
2017-01-16Cleanup/refactor: get rid of fixed name limit in BKE_deform_flip_side_name & co.Bastien Montagne
Those were forcing to use vgroup name define in bones area, or even mixing with maxbonename... ugly, and totally avoidable.
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).
2017-01-16Fix T50393: Flip names working just on one side when both are selected.Bastien Montagne
Just store bones that could not get renamed to desired flipped name on the first try into a temp list, and try to rename them a second time. This is rather simple solution, will induce 'over numbering' in case you flip a bone to another unselected bone's name (since number will be incremented in both rename attempts), but think this is acceptable minor glitch, for a corner case situation that does not have any good resolution anyway. Also, set `strip_numbers` option of `BKE_deform_flip_side_name` to false, otherwise chains of bones with same names would get their numbers completely messed up after name flipping. Based on work by @dfelinto in D2456 (https://developer.blender.org/D2456), thanks.
2016-12-08Fix T49872: 3D cursor places with camera shift in ortographic modeJulian Eisel
2016-11-16Disable possibility to flip bone names of linked armaturesSergey Sharybin
Linked data should not be modified in such a way. Reported by Nathan here in the studio, reviewed by Bastien, thanks!
2016-11-10Consider Numpad Enter in pose slide operatorsSergey Sharybin
It was annoying to only have regular Enter confirming input there.
2016-11-09Depsgraph: Fix crash deleting bones in armature edit modeSergey Sharybin
For the new dependency graph we have to rebuild graph when bones "topology" are changing.
2016-09-28POSELIB_OT_pose_add: only create keyframes for selected bones.Sybren A. Stüvel
Previously the pose library used the WholeCharacter key set, which ignores selection and add keys for almost all bones in the rig. This is a very slow operation on complex rigs. With this patch, only selected bones are keyed, defaulting to keying all bones when none are selected. Note that this fixes the FIXME previously mentioned in the source.
2016-09-19Fix T49385: Copy buffer is not from pose mode. Report ErrorSergey Sharybin
Quick fix for now, need to unlock studio here as well. Proper fix would be to modify API a bit and pass flags which will prevent expand called on bmain perhaps. But this we should discuss a bit,
2016-09-18Minor corrections for previous commitJulian Eisel
Was using wrong argument name in doxygen comment. Also reduced scope of vars. Sorry for the noise :/
2016-09-18BLI_listbase: Add/use utility to move link (BLI_listbase_link_move)Julian Eisel
We were calling BLI_remlink and then BLI_insertlinkbefore/after quite often. BLI_listbase_link_move simplifies code a bit and makes it easier to follow. It also returns if link position has changed which can be used to avoid unnecessary updates. Added it to a number of list reorder operators for now and made use of return value. Behavior shouldn't be changed. Also some minor cleanup.
2016-09-16Pose library sorting: return OPERATOR_CANCELLED when no-opSybren A. Stüvel
A no-op happens when trying to move the top pose further up, or the bottom pose further down.
2016-09-16Improve description of move operator direction propertiesJulian Eisel
These may be exposed in UI (keymap editor & redo panel), so better avoid using identifiers like "UP" "DOWN". They are redundant anyway (already displayed).
2016-09-16Added buttons to move a pose in a pose library up/down.Sybren A. Stüvel
This will break the pose library preview add-on, since that add-on uses file indices rather than pose names.
2016-09-15Use temp .blend file copybuffer for pose copy-pasteSergey Sharybin
Uses similar way of storing temp data as object copy paste, just uses different read entrypoint which does not modify current bmain. This gives ability to easily copy-paste poses from one blender to another one. Hopefully doesn't introduce user-measurable differences. Request from Peer here in the studio. Reviewers: mont29 Reviewed By: mont29 Subscribers: hjalti, fsiddi Differential Revision: https://developer.blender.org/D2229
2016-09-14Fix memory leak in copy pose operatorSergey Sharybin
2016-09-13Fix T49323: Ineffective bone roll calculation with low rig scaleSergey Sharybin
The code was expecting vector to be normalized, however after applying inverted object matrix it was possible to have scale applied to it.
2016-07-13Fix T48839: Selection from pose mode gives wrong snap resultsCampbell Barton
Current code changes the selection then then runs ED_armature_sync_selection to copy to the bones rootsel flag from the parents tipsel. Use this logic for entering edit-mode too.
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-03Cleanup & simplify snapping functionsGermano Cavalcante
- the name of the enumerator `SNAP_NOT_OBEDIT` was changed to `SNAP_NOT_ACTIVE`. - the parameter `snap_to_flag` was moved to outside `SnapObjectParams`. - the member `use_object_edit` was renamed to `use_object_edit_cage`. - added the arg `params` in `ED_transform_snap_object_project_ray`. - simplifications in the loop of the function `snapObjectsRay`.
2016-05-29Fix T48507: Symmetrize doesn't work properly on Bendy BonesJoshua Leung
2016-05-22Fix T48476: 'Recalculate Bone to Cursor' failsCampbell Barton
2016-05-20Fix T48470: Bendy Bones: Custom Handle References not being cleared when ↵Joshua Leung
bone deleted In addition to the original bug report, I've gone through cleaning up a range of related bugs which only became clear when hunting around the code... * Custom Handle References weren't getting cleared when the bones they used got deleted. But, neither was the custom bone shape location/transform reference. * Various places where posebone settings are copied around were also missing code to handle the new Bendy Bone properties. (WHY DO WE HAVE SO MANY VARIATIONS OF COPYING POSE DATA!?!?) * If duplicating a Bendy Bone with custom references, and the custom references are also selected/duplicated, the new Bendy Bones will use the corresponding duplicated bones
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-15Fix T48425: Armature Symmetrize is flipping Custom Shape parameter.Bastien Montagne
In case not all bones are selected, not all possible mirrors are set in editbone->temp.ebone, so we need to search them...
2016-05-14Fix T48426: Use same length for all header message strings.Bastien Montagne
Some languages like Chinese or Japanese take three or four bytes per char... Also fixed some missing translation markers for UI header messages.
2016-05-11Cleanup: only use r_ prefix for return argsCampbell Barton
2016-05-11Transform Volume rewrite/refactorGermano Cavalcante
Take advantage of the efficiency provided by the snap_context. Also fixes errors: - volume snap fails based on view angle (T48394). - multiple instances of dupli-objects break volume calculation.
2016-05-10Correct armature-sketch snap context useCampbell Barton
Use scene snap mode. Also allow passing NULL ray-depth which falls back to BVH_RAYCAST_DIST_MAX.
2016-05-06Cleanup: warningsCampbell Barton
Values set but not used
2016-05-05Transform/Snap: EditMesh/BKE_bvhutils API improvementsGermano Cavalcante
Separate the creation of trees from EditMesh from the creation of trees from DerivedMesh. This was meant to simplify the API, but didn't work out so well. `bvhtree_from_mesh_*` actually is working as `bvhtree_from_derivedmesh_*`. This is inconsistent with the trees created from EditMesh. Since for create them does not use the DerivedMesh. In such cases the dm is being used only to cache the tree in the struct DerivedMesh. What is immediately released once bvhtree is being used in functions that change(tag) the DM cleaning the cache. - Use a filter function so users of SnapObjectContext can define how edit-mesh elements are handled. - Remove em_evil. - bvhtree of EditMesh is now really cached in the snap functions. - Code becomes organized and easier to maintain. This is an important patch for future improvements in snapping functions.
2016-04-22Transform Snap: initial snap context refactorCampbell Barton
This introduces a snap-context that can be re-used for casting rays into the scene (by operators such as walk-mode, ruler and transform code). This can be used to cache data between calls too.