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
2020-11-03Materials: add custom object properties as uniform attributes.Alexander Gavrilov
This patch allows the user to type a property name into the Attribute node, which will then output the value of the property for each individual object, allowing to e.g. customize shaders by object without duplicating the shader. In order to make supporting this easier for Eevee, it is necessary to explicitly choose whether the attribute is varying or uniform via a dropdown option of the Attribute node. The dropdown also allows choosing whether instancing should be taken into account. The Cycles design treats all attributes as one common namespace, so the Blender interface converts the enum to a name prefix that can't be entered using keyboard. In Eevee, the attributes are provided to the shader via a UBO indexed with resource_id, similar to the existing Object Info data. Unlike it, however, it is necessary to maintain a separate buffer for every requested combination of attributes. This is done using a hash table with the attribute set as the key, as it is expected that technically different but similar materials may use the same set of attributes. In addition, in order to minimize wasted memory, a sparse UBO pool is implemented, so that chunks that don't contain any data don't have to be allocated. The back-end Cycles code is already refactored and committed by Brecht. Differential Revision: https://developer.blender.org/D2057
2020-11-03Cycles: immediately store the used_shader list in Blender interface.Alexander Gavrilov
Uniform attributes require immediate access to the shader list in object update code, so setting the field can't be deferred to a background task. This required adding a parameter to the clear method of Geometry. Ref D2057
2020-11-03Materials: support true float4 attributes in the Attribute node.Alexander Gavrilov
Add a new Alpha socket to the Attribute node that outputs the fourth component of the attribute. Currently the only such attribute is vertex color, but there may be more in the future. If the attribute has no alpha channel, the expected value is 1. The Cycles code is already refactored and committed by Brecht. Ref D2057
2020-11-03Docs: add comments to some surface deform internal structuresCampbell Barton
2020-11-03Cleanup: doxy param syntaxCampbell Barton
2020-11-03Cleanup: spellingCampbell Barton
2020-11-03Fix sequence tests writing HTML report to wrong directoryBrecht Van Lommel
It was missing from tests/report.html that gathers all tests reports.
2020-11-03Merge branch 'blender-v2.91-release'Sebastián Barschkis
2020-11-03Fluid: Fix crash with viewport display optionsSebastián Barschkis
Overlay extras should not be drawn outside of the fluid domain cache range.
2020-11-03Cleanup: Use recently added helper function to find File Browser UI dataJulian Eisel
`ED_fileselect_handler_area_find()` was added in a750acab78cf and makes this case more readable and avoids code duplication as well.
2020-11-03Fix T71759: Sculpt/Vertex/Weight Paint Brush Size Gets Undone After Undoing ↵Bastien Montagne
a Stroke. Add code preserving scene's toolsettings accross undo. IDPointers are dealt with special care, we try to keep existing ones for some (like brushes) when possible. Note that this covers ToolSettings, Brushes and Palettes currently. I'm not especially happy about how this new code mixes with existing 'foreach_id' one, in particular in scene. But cannot think of a better, more generic way to do it currently. Maniphest Tasks: T71759 Differential Revision: https://developer.blender.org/D9311
2020-11-03Add a callback to `IDTypeInfo` to allow preservation of some data accross ↵Bastien Montagne
memfile undos This is essentially adding that new callback, and using it only for already existing Scene's 3DCursor. Note that the place where this is called has been moved again, after all have been lib-linked, such that those callbacks may also work on ID pointers. Maniphest Tasks: T71759 Differential Revision: https://developer.blender.org/D9237
2020-11-03Merge branch 'blender-v2.91-release'Campbell Barton
2020-11-03Merge branch 'blender-v2.91-release'Campbell Barton
2020-11-03Fix T81988: Surface Deform "Bind" causes vertices to spikeCampbell Barton
Surface deform weight calculation assigned weights in a non-uniform way that caused vertices to deform upon binding. This was caused by the face-corner angle being used in calculations which where squared & scaled. Causing a triangle fan of many thin faces to have a much greater influence compared to the same shape made from a single triangle. Change the calculation of the weight so each face-corner is scaled by it's angle.
2020-11-03DrawManager: Cleanup unneeded memory allocationJeroen Bakker
`tris_per_mat` is only valid for the final buffer cache. It was allocated for every buffer cache.
2020-11-03Merge branch 'blender-v2.91-release'Nathan Craddock
2020-11-03Fix T77161: Outliner - Hiding a Collection does not gray out children objectsManuel Castilla
Ensure that When checking "Hide in Viewport" option for a collection that child objects are drawn grayed out for consistency with the "Disable in Viewports" toggle. For checking an object visibility in the viewport the flag BASE_VISIBLE_VIEWLAYER should be used instead of BASE_VISIBLE_DEPSGRAPH because the latter ignores viewport visibility. Manifest Task: T77161 Differential Revision: https://developer.blender.org/D7904
2020-11-03Outliner: Add "Selectable" object filterJaggz H
This addition to the filters allows the user to enable the outliner tree to restrict the listing to only Selectable objects. Differential Revision: https://developer.blender.org/D7310
2020-11-03Cleanup: Use typedef for bevel angle kind enumHans Goudey
This makes debugging slightly easier, and makes the code slightly more explicit about its intentions.
2020-11-03Merge branch 'blender-v2.91-release'Hans Goudey
2020-11-03Fix T82120: Arc miter bevel creates miters on straight edgesHans Goudey
In some situations where two beveled edges were very close to in-line but not quite straight, bevel would build a miter when it shouldn't. The code that chose whether to use a miter at each vertex was slightly incorrect. For outer miters there is a check for 3 or more selected edges, but an inner miter can still be useful with only two beveled edges at a vertex, so we can't use that here. Instead I changed the check for in-line edges to run before determining whether the angle is reflex or not. The logic ends up a bit more straightforward as well. This doesn't completely remove the rather strange looking triangle vertex meshes at each corner, but it does make it stable when locations are slightly adjusted. The only other place this `edges_angle_kind` function was used is for profile=1.0 vertex meshes. I tested and made sure that still works well. Differential Revision: https://developer.blender.org/D9420
2020-11-03Fix T64138: Windows Ink continuous grab at window edge.Nicholas Rishel
WM_POINTERLEAVE occurs when the pen goes out of range or when a hovering pen leaves the window's boundary. When leaving the window boundary the xy position is invalid for some Wacom devices. This change removes creation of GHOST_EventCursor during WM_POINTERLEAVE events. This prevents unexpected jumping behavior during continuous grab.
2020-11-03Cleanup: Remove unused parameter in panel codeHans Goudey
This is no longer used after rB54da72d3cd546ecb, but passing it to a recursive call hid the warning.
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-11-03Fix possible use-after-free when closing Blender with File Browser openJulian Eisel
I think there wasn't actually any issue currently, but only by luck. We still passed around and NULL-checked a pointer to freed memory (the file operator, `SpaceFile.op`) which is easy to break and should be avoided. Noticed while testing D8598.
2020-11-03Cleanup: Mark arguments as constHans Goudey
2020-11-03VSE: Media transform redesignRichard Antalik
This patch changes behavior of strip transform and crop feature. Purpose of this change is to allow display arbitrary portion of input image, simplify user interface and workflow. Offset and Crop values in old files are converted in versioning. Offset animation is also converted. Crop animation and animation of crop or offset enable properties is not taken into account Changes in behavior and interface: - If image is added to timeline it is scaled to fit inside preview area while maintaining aspect ratio. Image is centered. This is considered as a baseline for further transformation. - Scale and rotation was added, so it is possible to transform image at it's original resolution. - Crop will not affect image transformation (does not move image). - Values of Crop and Transform Position are in pixels, these values are corrected if preview is fraction of project resolution. - Transform and Mirror panel has been removed and new Transform panel and Crop panel is moved to Adjust panel. Mirror is now part of new Transform panel. Technical changes: - Preprocessing stage must work on duplicated image, because original is cached. Previously Crop and Offset could run at once and required only one duplication of image. This is not the case with new algorithms, so duplication on demand is implemented. Transformation can read original image and will output new image that is safe to modify. It should be possible to add crop step to transform algorithm, so that Crop won't require previous duplication though. - Use Crop and Use Translation checkboxes were removed. Individual values are compared to default values to check if image needs to be processed. In case of transform this will be done also if resolution of source. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8393
2020-11-02Revert "VSE: Media transform redesign"Richard Antalik
This reverts commit 0277579b2850f0ba097741ca22eb8ae9ccd9bcea. This commit caused build errors on Linux.
2020-11-02Revert "Cleanup: store results of function calls in const values."Bastien Montagne
This reverts commit 20c4aa13de7ba403e113df8ec69c632b6815eac8. Wrong buggy commit breaking tests, and not actually adding anything to code quality.
2020-11-02VSE: Media transform redesignRichard Antalik
This patch changes behavior of strip transform and crop feature. Purpose of this change is to allow display arbitrary portion of input image, simplify user interface and workflow. Offset and Crop values in old files are converted in versioning. Offset animation is also converted. Crop animation and animation of crop or offset enable properties is not taken into account Changes in behavior and interface: - If image is added to timeline it is scaled to fit inside preview area while maintaining aspect ratio. Image is centered. This is considered as a baseline for further transformation. - Scale and rotation was added, so it is possible to transform image at it's original resolution. - Crop will not affect image transformation (does not move image). - Values of Crop and Transform Position are in pixels, these values are corrected if preview is fraction of project resolution. - Transform and Mirror panel has been removed and new Transform panel and Crop panel is moved to Adjust panel. Mirror is now part of new Transform panel. Technical changes: - Preprocessing stage must work on duplicated image, because original is cached. Previously Crop and Offset could run at once and required only one duplication of image. This is not the case with new algorithms, so duplication on demand is implemented. Transformation can read original image and will output new image that is safe to modify. It should be possible to add crop step to transform algorithm, so that Crop won't require previous duplication though. - Use Crop and Use Translation checkboxes were removed. Individual values are compared to default values to check if image needs to be processed. In case of transform this will be done also if resolution of source. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8393
2020-11-02Fix T77819: Snap Incremental does not match grid in all casesGermano Cavalcante
The behavior of the incremental snap did not take into account the relative dimensions of the window, which resulted in a different behavior if the area height was greater than the width.
2020-11-02UI: Enable writing global area data (top-bar, status-bar) to .blend'sJulian Eisel
There should not be much user visible here (other than T73668 being addressed). I added the writing code already for the initial implementation of workspaces, but we decided to keep it disabled until the top-bar design is more clear. It was never planned to keep this disabled for so long. Fixes T73668.
2020-11-02Fix Cycles kernel compile error with NanoVDB because of type redefinitionPatrick Mours
Cycles defines some basic integer types since it cannot use the standard headers when compiling with NVRTC. NanoVDB however only does this when the "__CUDACC_RTC__" define is set and otherwise includes the standard "stdint.h" header which clashes with those typedefs. So for compatibility do the same thing in the Cycles kernel headers. See also T81454.
2020-11-02LibOverride: make some pose options overridable.Bastien Montagne
Request from the studio.
2020-11-02Grease Pencil UI code: use `row` for rows in the UISybren A. Stüvel
Rename `col` to `row` when it's actually a row (and not a column). No functional changes.
2020-11-02UI: Simplify some tool icon geometryHans Goudey
Removing interior vertices can remove some complexity from the final exports. Also improved the topology slightly in some cases.
2020-11-02Cleanup: store results of function calls in const values.Bastien Montagne
2020-11-02Fix py-defined pointer properties wrong tag re ID ownership.Bastien Montagne
This fixes critical bug with liboverride when soe add-ons add some RNA ID Pointer properties. ID pointers should **never** have ownership of their ID when defined from python. (As a reminder, RNA properties owning their ID pointers are extremely rare even from C code, only embedded IDs (root node trees, master collections) and the shape keys snowflakes are concerned.)
2020-11-02Fix incorrect colors in grease pencil strength tool iconHans Goudey
2020-11-02Cleanup: Document output of `BKE_object_where_is_calc` and friendsSybren A. Stüvel
Add a comment to the declaration of the `BKE_object_where_is_calc...()` functions to explain where the result of the calculation is stored. No functional changes.
2020-11-02Cleanup: Sanitise return value of `ED_object_parent_set()`Sybren A. Stüvel
Consistently return `false` from `ED_object_parent_set()` when parenting is not possible. Before, when parent and child were the same object, the function would return `true` even though the parent-child relation was not made. Just returning `false` in the `parent == child` case would break the parenting operator, as `false` stops its loop over all selected objects. This tight coupling caused T82312. The loop now has its own check for this, so that it properly continues, and the implementation of `ED_object_parent_set()` is decoupled from its surrounding code. No functional changes.
2020-11-02GPencil: Cleanup comments typo errorAntonio Vazquez
2020-11-02Add comment about size of generated previews of filebrowser thumnails.Bastien Montagne
2020-11-02Fix crash opening some 2.4x .blend files with drivers or NLA editorBrecht Van Lommel
For example, outlinertest.blend from test240.zip.
2020-11-02Another attempt at fixing T81963: Random rare crashes in override code.Bastien Montagne
Adding another pass of ensuring valid up-to-date pose data in RNA function itself...
2020-11-02LibOverride: Do not assert on missing operands in apply function.Bastien Montagne
This can happen after some changes in lib file and resync in user file e.g..
2020-11-02Re-enable WITH_COMPILER_SHORT_FILE_MACRO, fix build error.Ankit Meel
The issue was in `buildinfo.c`: char build_c[xx]flags[] = BUILD_C[XX]FLAGS; Non-escaped double-quotes were terminating the string early, and causing the compile error. So use single-quotes.
2020-11-02Turn off WITH_COMPILER_SHORT_FILE_MACRO temporarily.Ankit Meel
It's causing build errors on compilers that I don't have. Turn it off while I fix them. Added in {rB1daa3c3f0a1cfd74bef527e0207f38154e591d46}.
2020-11-02Merge remote-tracking branch 'origin/blender-v2.91-release'Sybren A. Stüvel