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
path: root/source
AgeCommit message (Collapse)Author
2020-12-10- normalize qt before doing math on themtemp-nla-strip-alignmentWayde Moss
- ensure strip alignment panel script loaded
2020-12-10- clean up formatting and obselete commentsWayde Moss
2020-12-10- minor update for recent commits on master by othersWayde Moss
2020-12-10- bugfix: fixed the scaling problem. Was due to not normalizing quaternion ↵Wayde Moss
after reading from fcurves
2020-12-10- due to last commit, no longer need C-side python UI for alignment propertiesWayde Moss
2020-12-10- general bugfix that should be committed separately: ↵Wayde Moss
context.selected_nla_strips would have the wrong pointerRNA associated with it. This leads to unresponsive UI when strip values changed through python-made UI.
2020-12-10- typo fix: rna_nla: remove parmWayde Moss
- blend xform allocation separated from adding to list to make duplication simpler
2020-12-10- add proper support for duplicating nla strips with preblend transformsWayde Moss
2020-12-10- renamed NlaStripPreBlendTransform to NlaBlendTransform, preblend to blend, etcWayde Moss
2020-12-10- used quaternion slerp through shortest angle for non full replace blends ↵Wayde Moss
to fix issue of rotation through longer angle. Unsure if animator ever wants the opposite. If so, that makes things a bit more complicated for specifying which nla channels should have it applied.
2020-12-10support for file read/writing new preblend xform dataWayde Moss
2020-12-10- actionclip raw eval temporarily always creates new channels until I update ↵Wayde Moss
function call
2020-12-10- rna for preblend bones (rna path not working properly)Wayde Moss
2020-12-10- fixed preblend xform struct byte alignmentWayde Moss
- fixed rna collection to support add/removal of preblend xforms - removed C-based nla alignment UI
2020-12-10- WIP add nla alignment UI in pythonWayde Moss
2020-12-10- WIP rough core implementation of strip preblend xform support for ↵Wayde Moss
animation alignment
2020-12-10-some early WIP for strip alignment:Wayde Moss
Overall Need: UI: -ability to add NlaStrip preblend transform elements using UI -add, remove, clear -bone_name from selection, from active -ability to copy bone targets between strips UI: -visualization of traversal bone for general alignment, similar to motion paths but without the need for an accurate world transform. It should update as preblend xform changes. Ideally this path is grabbale and transformable like any other object. Would require making own transform_convert_stripPreBlendTransform code... (opportunity to make Python API for it?) Core algorithm implementation: -instead of blending strips as their value obtained, we need to get all raw values. Then apply preblend xform, then we can blend the whole snapshot. For efficiency, we can allocate the relevant NlaEvalChannels for bones right after creating NlaEvalData.
2020-12-10NLA: Action Strip Defaults Sync Length OnWayde Moss
Differential Revision: https://developer.blender.org/D9661
2020-12-10Feature: NLA Merge StripsWayde Moss
Todo: add media and example files This patch is relative to {D8296} (which is relative to {D9247}. Apply {D9247} first then {D8296} then this one. For user-facing design discussion: {T80235} ____ **Problem/Solution:** Before, the only way to combine multiple Nla strips into a single strip is to execute a Bake operator. However, this will merge **all** strips into a replace strip with full influence. This patch creates a new operator "Resample Strips To New" which effectively allows merging a set of selected NlaStrips into a single strip of any blendmode and any nonzero influence. The old selected strips will be muted while preserving the whole Nla result. (I used the word "resample" because it's more general. But most animators will recognize it as a "merge"). This patch offers a more flexible solution to {T69105}, where the solution implemented was to force baking to a single replace strip with full influence. **Feature:** Nla add support for resampling selected strips into a new track. The more specific use is to support merging selected Nla strips into a single strip. The core resampling function is (anim_sys.c) //BKE_animsys_resample_selected_strips()// (direct copy+paste of function comment) ``` /** Mute selected NLA strips and resample into a new track. The final Nla stack result will be * preserved when possible. New resampled strip will be selected. Previously selected strips will * be muted and deselected afterward. * * \param resample_blendmode: Resulting resampled strip's blend mode. * \param resample_influence: Resulting resampled strip's influence. above. * \param resample_insertion_nlt_index: NlaTrack to insert the resample track above or below. * \param insert_track_lower: Side of resample_insertion_nlt_index to place resample track. * \returns: The new resample track. Returns NULL and does nothing if in tweak mode, resample * influence zero, or no fcurves are involved in the resample. */ ``` **Intended Uses:** Merge Strips: User selects a block of NlaStrips and Resamples. Effectively, all selected strips will become muted and a new "merged" track will be created. Since the overall NLA stack result is preserved, the result is equivalent to a merge. Convert Strip: User selects a single NlaStrip and Resamples with a different blendmode and/or influence. **Potential improvements/changes:** For frames where user had a keyframe, make them non-selected. Select non-user keys. This allows a follow-up op to do an Fcurve simplify or decimate of only the baked keyframes. Effectively it allows a follow-up Smart Bake that preserves user keys. Perhaps this can be done by the caller. Allow user to somehow select channels to be resampled. Currently all channels found in all selected strips are resampled. Though a simple work around is to delete the undesired channels after the resample. **Limitations and potential problems:** Design: When resample strip value not valid, what should we do? Currently we write a default value. Nothing we write will preserve the animation. This leaves the problem as a "Known Issue". This operator will not properly resample outside of the resample bounds. Generally, it's not possible since multiple strips with non-None extend modes can not be represented by a single strip of any extend mode.. Maybe it's possible by properly setting the pre and post extrapolation for individual fcurves? _____ **Some existing functions in (anim_sys.c) that had to be modified slightly for //BKE_animsys_resample_selected_strips()//:** - changes (anim_sys.c) //nlastrip_evaluate()// and its nested calls to pass //allow_alloc_channels //to control whether NlaEvalChannels are allocated or to only blend existing channels. Flushing and keyframing require allocation. The new merging operator only needs to blend existing channels and requires no allocation. There are potential areas for refactoring but haven't been implemented to keep the review simpler and more linear. It's an attempt to prevent introducing bugs that occur as a result of refactoring instead of the patch itself. Differential Revision: https://developer.blender.org/D8867
2020-12-10Feature: NLA: Evaluate Whole NLA Stack in Tweak ModeWayde Moss
Feature: NLA: show and evaluate whole NLA stack while in tweak mode: **Note for reviewers** This patch is relative to {D9247}. Apply that patch first, then apply this one afterward. For reviewers, the two core functions changed are in anim_sys.c (BKE_animsys_nla_remap_keyframe_values and animsys_calculate_nla). I've separated the old animsys_evaluate_nla() into for_flush and for_keyframing variations to make the intent clear. I should add that the nlastrip_evaluate() and recursive strip evaluate calls have been duplicated for inverting. They can be refactored but I've decided against it. I didn't want to refactor and add a new feature in a single patch. Keeping those calls nearly the same should make them easier to understand relative to the old implementation. I suppose I could've refactored first then made the patch, but without the duplication it could've been difficult to see the motivation for refactoring choices. **Question**: I also noticed a UI-based confusion introduced by patch. If the animator has a nonpushed action then it has influence even while in tweak mode which is expected. However, the bounds of that influence is currently not drawn in any way while in tweak mode. It can be a surprise and source of confusion when the non-pushed action begins to influence the animation result. I should talk to the UI team about how it should be drawn. Or maybe it should be a separate patch so the UI can be developed separately given this patch is relatively big already? Should it just be part of {D7600} since that patch is close to the problem area and this one depends on it? **Problem/Solution** This feature solves the problem of not being able to see and consider the final animation result while tweaking a strip. Before, as a user keyframes a strip, the upper strips would be disabled. Now, the user can optionally view the upper strip affects while keyframing. The strips above it are accounted for such that the final NLA result matches what the user visually keyframed. The feature pros and cons itself sounds self explanatory but let me know if I should explain more in depth. **Implementation** The core implementation is that each upper strip needs to be inverted separately, solving for the blend output of the lower stack. That goes on until we have solved for the blend output of the tweaked strip and lower stack. Then we use the old existing invert math to get the fcurve value of the tweak strip. The lower stack can be inverted as a group instead of separately because we're solving for the tweak strip's value, not the lower blended value, and it doesn't include the tweaked strip. **Changes to old behavior (Evaluating without upper stack)** Evaluating upper stack is optional and, for now, set as default (Tab). The RClick context menu and header menu exposes the option to evaluate without the upper stack (Ctrl+Tab). Tweaked strip no longer uses animdata->act_influence since that's used by the non-pushed action. **Bugfixes Included Relative to Public Version ** This includes bugfixes such as evaluating meta strips correctly when next to a transition {D8287}. **Limitations Introduced by Patch** Keyframing through a quaternion transition of (Combine<->Replace/Add/Sub/Mul) is not handled properly and will fail to insert a keyframe. I'm still working out the math, at least for the case of (Combine<->Replace). Other quaternion transition cases should be handled properly (Combine<->Combine) and (Add/Sub/Mul/Replace <-> Add/Sub/Mul/Replace). All non-quaternion transition cases should be handled properly. This limitation only applies when such transitions appear above the tweaked strip and the upper NLA stack is enabled. Transitions that appear below the tweaked strip does not break keyframing. **Example Files** Location Focused: {F8802904} Quaternion Focused: {F8802907} Scale Focused: {F8802906} Each file has multiple objects in it that have simple NLA setups. It's just meant to save a little bit of time. Autokeying is on and keying sets match the file focus. Per check, just unhide one object at a time, enter tweak mode on the lowest strip, then try to keyframe. In most cases, your overall NLA results should be preserved when refreshing the keyframe(changing to different frame then back to the keyframed one). General failure cases include not being able to keyframe through full (influence = 1) Replace strips nor Multiply Zero strips. These are expected, mathematically there is no solution. For quaternion, an additional failure case can occur even when keyframing through a partial Replace strip. Quaternions only interpolate within 180 degrees so if the solution requires that it rotates further than 180, then the keyframe will be wrong. **(Note to self: Todo)** Current patch implementation does not properly fail on this case. For location, it's easy to verify by using auto keying and snapping Suzanne to cursor. Refresh the frame and her origin should match the cursor. Generally, I just eyeball things and use the grid. No specific Euler file since NLA evaluation is the same as location values. The Scale file only includes Combine strip examples since other blends modes evaluate the same as any other property, like location. **Existing Limitations of NLA Not Solved By Patch** If the tweaked strip's action evaluates multiple times in the same frame, then it's not solved for correctly. To support this is nontrivial. We have to allow keyframing at multiple frames and account for the different flags of each strip that uses the same action. The lower stack would have to be inverted separately just like the upper stack. Each strip may also sample the action using a different action range too.. Transitions between the linked action.. It's complicated. I expect it to be rare for the user to linked duplicate an action, overlay them stack-wise and want to keyframe.. That feature is out of scope. The attached file is a quick setup to verify the limitation. Autokeying is already on. Move the cube on the X-Axis then refresh the frame (change back to the same frame). The cube will be in a different location than keyed. {F8883083} Differential Revision: https://developer.blender.org/D8296
2020-12-10Refactor: NLA Prep for D8296Wayde Moss
No intended functional changes. This is the refactor of NLA evaluation to prepare for {D8296}. I was using TortoiseGitMerge to look at the diff to try to make the diff more readable.. but it looks like arcanist(?)/this-site uses a different method. Refactor notes - generally, functions not shuffled around so diffs are clearer - in //(anim_sys.c) nlaeval_blend_value()//, the bitmap writes to// NlaEvalChannel->valid// are unused and redundant so they're removed. - renames //NlaEvalChannel->valid// to //NlaEvalChannel->domain// for term consistency with usage - for blending functions, more descriptive names used and float equality checks changed to use //IS_EQF()// instead of ==. - //(anim_sys.c) animsys_evaluate_nla()// separated into //for_flush //and //for_keyframing //variants to reduce complexity by making the use clear. - the dummy strip creation has been refactored to two separate functions for the tweak strip and nonpushed action strip. Both are evaluated differently from other strips and eachother. There's no need to interweave them. A future patch {D8296} generally requires both strips. - XXX //(anim_sys.c) nlatrack_find_tweaked()// is a work around and temporary. If anyone has any insight into this problem, help is appreciated. - //(anim_sys.c) nonstrip_action_fill_strip_data()// doesn't call// nlastrips_ctime_get_strip()// due to a future patch {D8867} needs to call the latter N times but the former only needs to be called once. - //(anim_sys.c) BKE_is_nlatrack_evaluatable() //is an API function so a future patch {D8867} can access it. - //(anim_sys.c) BKE_animsys_nla_remap_keyframe_values()// removed full replace strip early out. Future patch {D8296} can't use it. - add const, limited to refactored areas - remove redundant switch-case fall throughs to default - //nlaeval_blend_flush()// small refactor, replace branching with assertion - return value of //nla_combine_quaternion_invert_get_fcurve_values()// implemented to handle case where influence == 0. This failure case added to other blend inversions too. The Nla remap function // (anim_sys.c) BKE_animsys_nla_remap_keyframe_values()// does this check but future patch {D8867} will not use the remap function directly. Differential Revision: https://developer.blender.org/D9247
2020-12-09Fix another id-property name length checkCampbell Barton
Missed this in 6c9263d817b7b4dcd4d6e1f365d1db0a83de6e51
2020-12-09Fix off by one error in id-property name validationCampbell Barton
The Python API accepted a name with 64 bytes, clipping it to 63.
2020-12-09Fix RNA un-escaping multiple slashes and strings ending with a slashCampbell Barton
Fix for T78823 resolved the issue reported but didn't properly support multiple back-slashes.
2020-12-09Fix T78823: Slash in custom property name does not workCampbell Barton
This fixes inserting key-frames for any collection names containing a back-slash too (bones, modifiers, sequence strips etc).
2020-12-09Revert "Fix T78823: Slash in custom property name does not work"Campbell Barton
This reverts commit cbae82ba960a0baaae6437b176a310f078ce07d8. This change introduced the following problems: - We could no longer reliably duplicate or use an existing custom property names. - We could no longer assume a bone or ID name can be used in a custom-property. - Importers that support custom properties (such as FBX) could fail with an exception creating custom properties.
2020-12-09Cleanup: use doxy sections for graph_edit.cCampbell Barton
2020-12-09creator: remove reference to SDL_AUDIODRIVER from --help textCampbell Barton
This was added when Linux's audio support often needed to be manually configured. Further 3rd party libraries have their own environment variables & docs these need not be part of Blender's help message unless they're likely to be needed to properly run Blender.
2020-12-09Cleanup: use common 'MOD_WELD_MODE_' prefixCampbell Barton
2020-12-09Modifier: Add "Connected" mode to the weld modifierHenrik Dick
Implement improvement from T73139 for merging along edges. It is now called "Connected" mode, while the default is called "All". With the recent performance improvement, the Connected Mode is in some cases only double the speed than the usual merge all strategy but in other cases it may be even faster. The bottleneck is somewhere further down the line of merging geometry. The motivation for this patch came from T80897, because the merging in complex solidify is making it very slow. Now merging can be removed from solidify without greater consequences, as this is just a quicker and more advanced algorithm to do the same thing that solidify currently does slowly. Reviewed by: mano-wii, campbellbarton Ref D8966
2020-12-08Fix T83559: File Browser uses wrong operationJulian Eisel
When opening a temporary File Browser, we have to make sure the file selection parameters are refreshed. When opening it in a new Window that would always be the case, if the File Browser uses a maximized window (as set in the Preferences), it might reuse space-data from a previous use. So we have to force the refresh. Also renamed the relevant function to be more clear about what it's doing. Mistake in 95b3c4c966f9.
2020-12-08Fix T83114: incorrect normals after joining subdivided meshesJacques Lucke
This just makes sure that the mesh coming out of the subdivision surface node has correct normals. Ideally, we would lazily compute derived data like normals in more cases, but that can be solved later. Correctness is more important right now. In order to solve this better, it would be nice if functions like `BKE_mesh_ensure_normals` would take a `const Mesh *`. The mesh could be considered to be logically const, because normals are derived data that is only cached for the current state of the mesh.
2020-12-08Fix T83337: boundary smooth input in subdivision surface node is invertedLéo Depoix
Differential Revision: https://developer.blender.org/D9753
2020-12-08Fix T81950: GPencil - Draw - Stoke Placement Stroke Feature BrokenJamell Moore
Buffer strokes weren't being the excluded from depth only draw calls so were being included in depth tests. They are now excluded by bypassing the creation of the buffer strokes. Reviewed By: fclem Differential Revision: https://developer.blender.org/D9742
2020-12-08Cleanup: Use enum for file selection type definitionsJulian Eisel
Makes it more clear that these belong together and allows using the enum type rather than just `int`.
2020-12-08Cleanup: Correct an own earlier commit to use an existing utility functionJulian Eisel
Didn't know this function existed, better to use it then to avoid verbosity.
2020-12-08File Browser: Refactor access to the selection parameters structJulian Eisel
* Avoid direct access to `SpaceFile.params`, use a getter instead. This matters because once the asset-browser changes are in, there will be an alternative selection parameter object. The getter can return the correct one. * Rename the function to ensure the parameters. The old name `ED_fileselect_get_params()` wasn't a mere getter, it would create the parameters if necessary. Now we have an actual getter, so better be clear. * In some instances, I replaced the old "get" function with the new mere getter. So the ensure logic is called less often. However, in these cases we should be able to assume the selection parameters were created already as part of the editor creation routine. The term "active" in the new function names may seem a bit odd in the current context, but that is a preparation for the Asset Browser merge as well. Like said, there will be two file selection parameter objects in the space.
2020-12-08Cleanup: Use guarded allocator for data-block names returned from file readingJulian Eisel
Direcly using the C library allocator functions is usually avoided in favor of our guarded allocator. It's more useful when debugging.
2020-12-08Fix unexpected "/" path after normalizing empty directory pathJulian Eisel
Caused problems in the Asset Browser branch when passing an empty path. The function shouldn't blindly add a slash but sanity-check the input parameters first.
2020-12-08LibOverride: Add initial support for adding new NLA tracks.Bastien Montagne
Also makes NLA tracks and strips overridable. User can either edit existing strips in existing NLA tracks (but not add or remove them), and/or add new NLA tracks after those comming from the linked data. Most of the work was as usual checking operators and adding protections against illegal operations in override context. Note that since we can only rely on indices to deal with local added tracks, we forbid any local track being before any linked/original track. Maniphest Tasks: T72629 Differential Revision: https://developer.blender.org/D9611
2020-12-08CMake: fix linking with WITH_SDL_DYNLOADCampbell Barton
While this was only needed in 'source/blender/python', add to ghost to avoid problems in the future.
2020-12-08Cleanup: use static declarationsCampbell Barton
2020-12-08shaders_test: correct arguments to EEVEE_shaders_cryptomatte_sh_getCampbell Barton
2020-12-08Cleanup: LibOverride: Forgot to update comments in previous commit.Bastien Montagne
2020-12-08LibOverride: Refactor collection items 'local' helper functions.Bastien Montagne
It's easier to read and less 'weird' to check that an item is non-local in a liboverride data-block, than the other way around. Thanks to @sybren for noticing it.
2020-12-08Fix T83117: Curve bevel not handle aligned at end-pointsCampbell Barton
Caused by fix for T80742, 4987b7d347a885916916a888c18401ea2fe552f4. Keep the fix that calculates the start/end direction from adjacent points but only use it as a fallback.
2020-12-08Spelling: Bit Depth Compound ModifiersYevgeny Makarov
Correct usage of compound modifiers like '32-bit'. Differential Revision: https://developer.blender.org/D9769 Reviewed by Julian Eisel
2020-12-08UI: Correct Usage of 'Eevee' NameYevgeny Makarov
Use accepted capitalization of Eevee, not 'EEVEE'. Differential Revision: https://developer.blender.org/D9770 Reviewed by Julian Eisel
2020-12-07Fix T83307: Some modal keys of transform operators don't correspond to the ↵Germano Cavalcante
expected effect The transform modes `shrinkfatten` and `seq_slide` have a special way of handling events. They use modal events in a different way than expected. Therefore, this commit adds special event handles for these modes and removes the keymodal tips from the status bar. These effects are already described in the header anyway.
2020-12-07Fix T83510: Convert Gpencil to curve crash when stroke has zero pointsAntonio Vazquez
If the stroke had zero points the pointer returned NULL. Also replaced for loop by FOREACH macro. This is a corner case of "empty" strokes without points.