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
2021-07-05Merge branch 'master' into refactor-vertex-group-namesHans Goudey
2021-07-05Rename functions "for_read" -> "" and "for_write" -> "mutable"Hans Goudey
2021-07-05macOS: support Japanese input for text buttonsYuki Hashimoto
Blender did not support to input East Asian characters (Chinese, Japanese, Korean) on macOS. This patch adds support for Japanese input, by implementing the appropriate processing for the NSTextInputClient protocol. Technical notes: * The conversion candidate window is drawn by the input method program calling `firstRectForCharacterRange`. * The string before confirmation (called `composite` in blender) is handled in the `setMarkedText` method called by the input method program. * The string after confirmation (called `result` in the blender) is processed in the `insertText` method called by the input method program. Ref T51283 Differential Revision: https://developer.blender.org/D11695
2021-07-05Fix: macOS wrong IME candidate window position on first displayYuki Hashimoto
IME conversion candidate window was displayed at the mouse position, instead of below the cursor or text selection. Blender need to tell the input method program where the conversion candidate window is during Japanese and Chinese input. In macOS, the `firstRectforCharacterRange` is called when input by the input method starts, and the position of the conversion candidate window is specified. Therefore, it is necessary to set the position of the conversion candidate window before input starts. This patch changes it so that the position of the conversion candidate window is always set when the cursor is drawn. Differential Revision: https://developer.blender.org/D11697
2021-07-05Cleanup: Rename ambiguous "params" variable in File Browser notifier listenersJulian Eisel
File Browser code uses the term "params" for its file selection parameters a lot. Avoid confusion/ambiguity by calling the notifier listener parameters "listener_params".
2021-07-05Assets: Disable file renaming operator for Asset BrowsersJulian Eisel
This operator only works with renaming files, not assets.
2021-07-05EditMesh: extract restore logic out of EDBM_redo_state_freeCampbell Barton
Split mesh restore logic into a new function: `EDBM_redo_state_restore_and_free`.
2021-07-05Merge branch 'master' into refactor-vertex-group-namesHans Goudey
2021-07-05Fix: IME input displays text after cursor before cursorYuki Hashimoto
When inserting text using IME on a button, the character after the cursor is displayed before the cursor. This bug seems to have occurred during the refactoring in D765. Differential Revision: https://developer.blender.org/D11072
2021-07-05Cleanup: spelling, punctuationCampbell Barton
2021-07-05Cleanup: move repeated assignment out of nested for loopCampbell Barton
2021-07-05Cleanup: use const argumentsCampbell Barton
2021-07-05Cleanup: use 'use_' prefix for RNA booleansCampbell Barton
2021-07-05Cleanup: remove unnecessary bmesh operator commentsCampbell Barton
2021-07-05Cleanup: Move common File Browser renaming code into functionsJulian Eisel
Code would manually do the same things in a couple of places, obvious case of unnecessary code duplication.
2021-07-05Cleanup: clang-tidyCampbell Barton
2021-07-05Cleanup: remove outdated commentCampbell Barton
2021-07-05Fix early return in reverse-color where continue was intendedCampbell Barton
2021-07-05Geometry Nodes: new Viewer nodeJacques Lucke
This adds a viewer node similar to the one in the compositor. The icon in the headers of nodes is removed because it served the same purpose and is not necessary anymore. Node outputs can be connected to the active viewer using ctrl+shift+LMB, just like in the compositor. Right now this collides with the shortcut used in the node wrangler addon, which will be changed separately. As of now, the viewed geometry is only visible in the spreadsheet. Viewport visualization will be added separately. There are a couple of benefits of using a viewer node compared to the old approach with the icon in the node header: * Better support for nodes that have more than one geometry output. * It's more consistent with the compositor. * If attributes become decoupled from geometry in the future, the viewer can have a separate input for the attribute to visualize. * The viewer node could potentially have visualization settings. * Allows to keep "visualization points" around by having multiple viewer nodes. * Less visual clutter in node headers. Differential Revision: https://developer.blender.org/D11470
2021-07-05BMesh: remove redundant mesh-backups from EDBM_op_* APICampbell Barton
Using BMesh operators through the edit-mesh API created a full copy of the mesh so it was possible to restore the mesh in case one of the operators raised an error. Remove support for automatic backup/restore from the EDBM_op_* API's as it adds significant overhead and was rarely used. Operators that need this can use the BMBackup API to backup & restore the mesh in case of failure. Add warning levels to BMO_error_raise so operators can report problems without it being interpreted as a request to cancel the operation. For high-poly meshes creating and freeing a full copy is an expensive operation, removing this gives a speedup of ~1.77x for most operators except for "connect_verts" / "connect_vert_pair" which still uses this functionality.
2021-07-05BMesh: remove redundant copy-on-write taggingCampbell Barton
The evaluated meshes no longer store a copy of the edit-mesh so tagging when a BMesh operator fails can be removed.
2021-07-05Cleanup: update comment formattingCampbell Barton
- Replace '[mce]' with "Mike Erwin". - Remove references to turn-table author as it isn't useful information, the author was credited in the commit message.
2021-07-05Cleanup: remove unused definesCampbell Barton
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-03More fixes and cleanupHans Goudey
2021-07-02Merge branch 'master' into refactor-vertex-group-namesHans Goudey
2021-07-02Cleanup: Further use of const when accessing evaluated meshHans Goudey
Also resolve a warning from the previous commit. The next blocker to using const is `BKE_mesh_wrapper_ensure_mdata`.
2021-07-02Cleanup: Fix variable redeclaration warningHans Goudey
2021-07-02Cleanup: Remove unused/unneeded code from old Asset Engine designJulian Eisel
This code was written for the File Browser together with the Asset Engine design, that is not part of the Asset Browser/System design anymore. Updated comments accordingly. `FileDirEntryRevision` was actually used, but I removed it and moved the used members to the parent `FileDirEntry`, since there is no concept of revisions currently. There should be no functional changes.
2021-07-02Constraints: support a new Local Space (Owner Orientation) for targets.Alexander Gavrilov
Add a new transformation space choice for bone constraints, which represent the local transformation of the target bone in the constraint owner's local space. The use case for this is transferring the local (i.e. excluding the effect of parents) motion of one bone to another one, while ignoring the difference between their rest pose orientations. The new option replaces the following setup: * A `child` bone of the `target`, rotated the same as `owner` in rest pose. * A `sibling` bone of the `target`, positioned same as `child` in rest pose and using Copy Transforms in World Space from `child`. * The `owner` bone constraint uses Local Space of `sibling`. (This analogy applies provided both bones use Local Location) Differential Revision: https://developer.blender.org/D9493
2021-07-02Copy Transforms: implement Remove Target Shear and more Mix options.Alexander Gavrilov
This constraint can be naturally viewed as a prototype for a future 4x4 matrix math node (or subset thereof), since its basic semantics already is matrix assignment. Thus it makes sense to add math options to this constraint to increase flexibility in the meantime. This patch adds support for several operations that would be useful: - An option to remove shear in the incoming target matrix. Shear is known to cause issues for various mathematical operations, so an option to remove it at key points is useful. Constraints based on Euler like Copy Rotation and Limit Rotation already have always enabled shear removal built in, because their math doesn't work correctly with shear. In the future node system shear removal would be a separate node (and currently Limit Rotation can be used as a Remove Shear constraint). However removing shear from the result of the target space conversion before mixing (similar to Copy Rotation) has to be built into Copy Transforms itself as an option. - More ways to combine the target and owner matrices. Similar to multiple Inherit Scale modes for parenting, there are multiple ways one may want to combine matrices based on context. This implements 3 variants for each of the Before/After modes (one of them already existing). - Full implements regular matrix multiplication as the most basic option. The downside is the risk of creating shear. - Aligned emulates the 'anti-shear' Aligned Inherit Scale mode, and basically uses Full for location, and Split for rotation/scale. (This choice already existed.) - Split Channels combines location, rotation and scale separately. Looking at D7547 there is demand for Split Channels in some cases, so I think it makes sense to include it in Copy Transforms too, so that the Mix menu items can be identical for it and the Action constraint. Differential Revision: https://developer.blender.org/D9469
2021-07-02File Browser: Refactor file "UUID" code (which wasn't really a "UUID")Julian Eisel
To some degree these are changes in preparation of further Asset Browser related changes, see D11119. But also, the current UUID design was written for the old Asset Engine design, which isn't part of the current Asset Browser/System design anymore. And lastly, "UUID" are a well established standard (https://en.wikipedia.org/wiki/Universally_unique_identifier) which this implementation didn't follow. What we have here is more of an index, or a unique identifier (https://en.wikipedia.org/wiki/Unique_identifier). So this does the following changes: * Renames "UUID" to "UID" * Changes the type of the UID to (a typedef'ed) `uint32_t`, which is more than enough for our current asset system design and simplifies things. * Due to the new type, we can avoid allocations for hash-table storage. * Add/use functions for UID handling Note that I am working on a major rewrite of the file-list code. Meanwhile we want to keep things sensible.
2021-07-02GPencil: New modifier to generate weights dynamicallyAntonio Vazquez
his new modifier allows to generate weights base on: * Angle of the stroke relative to object or world orientation. For example, if the value is 90, the maximum weights will be for vertical lines and minimum for horizontal lines. * Distance to Target object. The distance calculated is normalized to get valid weights between 0 and 1.0. The weights are created in an existing vertex group and the data can be replaced or mixed with the existing value to combine different weight effects. The minimum parameter, allows to define the minimum weight generated. This is useful to avoid very low weights. The generated weights can be used in any modifier. For example, the angle weight value can be used to mimic FreeStyle Caligraphy modifier using the weight with the thickness modifier. Also some modifier has been changed to inlude a new option to use the weights as factor of the effect. As result of this change, the fading option has been removed from Thickness and Opacity modifiers because this can be done using the new modifier, it's not logic to repeat the same. Reviewed By: mendio, filedescriptor Differential Revision: https://developer.blender.org/D11604
2021-07-02Cleanup: Use const variables for object's evaluated meshHans Goudey
Generally the evaluated mesh should not be changed, since that is the job of the modifier stack. Current code is far from const correct in that regard. This commit uses a const variable for the reult of `BKE_object_get_evaluated_mesh` in some cases. The most common remaining case is retrieving a BVH tree from the mesh.
2021-07-02Cleanup: refactor edit-mesh copy functions into functionsCampbell Barton
2021-07-02Cleanup: spelling in commentsCampbell Barton
2021-07-02VSE: Fix handle size calculationRichard Antalik
Handle width calculation was incorrect in drawing code. This caused handles to be invisible when zoomed out. After fixing math, handles become too large, so now they are constrained to quarter of strip width, which feels more natural and represents clickable area more closely. `sequence_handle_size_get_clamped()` did not return size in pixels, but in 2D-View space, this comment was corrected.
2021-07-01Fix memory leak in VSE transform codeRichard Antalik
SeqCollection wasn't freed. It wasn't easy to find culprit so added argument to SEQ_collection_create() to pass function name. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11746
2021-07-01VSE: Snapping feedbackRichard Antalik
Address initial feedback: - Use checkboxes instead of radio buttons - Hide snapping distance control from UI - Tweak snapping line color - use selected strip color, 50% transparency. Similar to other editors - Draw 2px thick line, since strip outline is also 2px thick Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D11759
2021-07-01Fix race condition when loading multiple File/Asset Browsers at onceJulian Eisel
When multiple File or Asset Browsers would load at once (e.g. when loading a file with two File Browsers open) and they would load multiple directories or .blend files (using the Recursions option in the File Browser or loading an asset library with multiple .blends), often only one File/Asset Browser would correctly load all files. Others would be incomplete or entirely empty. That was because of a race condition, where the directories or .blend files would be loaded concurrently and the first one that finished would cancel the other ones. This again happened because they used the job system with the same "owner", which by design makes all jobs with the same owner cancel as soon as the first is finished. Address this by making sure they have different owners. That is, not the scene anymore, but the filelist the job belongs to. Doesn't make much sense to use the scene as owner for scene-unrelated file loading anyway. Steps to reproduce were: * Open two File Browsers as regular editors. * In the Display Settings popover, set "Recursions" to 2 or 3 levels. * Navigate to a directory with plenty of subdirectories in both File Browsers. * Save the file. * Reload the file, one of the File Browsers likely has an incomplete file list. Alternatively, use Asset Browsers and open an asset library containing multiple .blends.
2021-07-01Fix: Export subtitles timecode relative to scene start frame, ignore muted ↵Paul Golter
strips This patch writes the timecode in the .srt file relative to the start frame of the scene. If the timecode is global but scene does not start at frame 0 the subtitles don't match if they get loaded in an external video player. Muted strips will be ignored. Don't allow negative timecodes in .srt. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11762
2021-07-01Fix edit-mesh partial update regression when snapping to normalsCampbell Barton
Edit-mesh partial update logic assumed translate didn't need normals to be recalculated (for faces with all vertices being transformed). However translate can optionally rotate which requires all transformed normals to be updated. Check for this case and use the previous partial-update method when it modified extra geometry, so the normals are properly reset. Further updates need not recalculate them.
2021-07-01Cleanup: replace booleans with enum for storing translate rotationCampbell Barton
2021-07-01Correction to T89571 fix 4546f176eb0f822048b53766f2e97c5a4cbf53c6Campbell Barton
Supporting both object & edit-mode is more involved. Both cases are now supported with object mode tracking the last-used state for rotation so it's only reset once when rotation is disabled.
2021-07-01Fix T89571: Align Orientation to Target keeps rotation when toggledCampbell Barton
2021-07-01Cleanup: spellingCampbell Barton
2021-07-01Cleanup: rename playhead to current-frameCampbell Barton
2021-07-01Cleanup: outdated IPO references in commentsCampbell Barton
2021-07-01Cleanup: remove unused internal grease pencil definitionsCampbell Barton