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
2021-02-08Cleanup: Remove using-directive from freestyle headersOmar Emara
The header files in freestyle utilize the using-directive at the global file scope. This is a bad practice as it pollutes the global name space causing possible ambiguous reference compilation errors. In particular, the DNA files that are included by freestyle will cause those ambiguous reference errors when the developers adds a DNA member with a type name that also exist in the Freestyle name space, such as Curve and possibly others. This patch does the minimal work needed to resolve that by moving the using-directives from the headers into the corresponding translation units. Reviewed By: Brecht Differential Revision: https://developer.blender.org/D10351
2021-02-08Fix T85448: File Browser sidebar collapses when selecting a fileJulian Eisel
The logic to ensure a valid region state was too aggressive in setting the region hiding. It would just always update it based on the operator's `hide_props_region` option, not only when file browser was newly opened. It's more selective now.
2021-02-08Fix (studio-reported) crash in readfile code.Bastien Montagne
Essentially, `lib_link_all` would perform some post-processing over data in given `bmain` that **may** fail when not all data from all libraries has been properly loaded yet. This happens when `lib_link_all` is called from `read_libraries`, where the bmains are split by libraries. Now those post-processing is put into its own utils function, which asserts that it is only called on a merged bmain. Bonus point, this will avoid re-runing those not-so-cheap operations more than once on the same data. Reproducible in r1442 of Sprite repository when opening `pro/animation_test/rex/performance/rex_crowdcamping/rex_crowdcamping.lighting.blend` NOTE: Not so sure why we have to call `lib_link_all` several times (once for each library, and then once on the whole merged bmain, including local IDs then). So that it can get called for libs while we still have that specific .blend file handle around? In any case, the overhead here is minimal since we do ensure a data-block is never lib-linked more than once, so this is not a serious concern right now. Differential Revision: https://developer.blender.org/D10307
2021-02-08Fix compilation error after recent refactorSergey Sharybin
Thanks Germano for review!
2021-02-08Transform: Refactor texture space 'transform_convert' dataGermano Cavalcante
The changes are: - Split conversion of the texture space data to its own file. - Skip adding keyframes with AutoKeyframes. - Skip recalculation of the trasform dependencies between objects. - Skip `special_aftertrans_update_...`. No real user functional changes
2021-02-08Cleanup: Unify, move and rename transform flagsGermano Cavalcante
Flags unified: T_CURSOR -> CTX_CURSOR T_TEXTURE -> CTX_TEXTURE Flags moved: T_CAMERA -> CTX_CAMERA T_POSE -> CTX_POSE_BONE T_OBJECT -> CTX_OBJECT T_TEXTURE -> CTX_TEXTURE_SPACE Flag renamed: CTX_EDGE -> CTX_EDGE_DATA
2021-02-08Transform: Grid snap target refactorGermano Cavalcante
The code takes many turns to get a suitable "target" for the snap to grid. Perhaps there were other reasons awaited for `transformCenter_from_type` and `TransCenterData center_cache[5]`. But since nothing is defined, it is better to simplify the code. No user functional changes
2021-02-08Cleanup: Rearrange and name the enums and flags used in the transform codeGermano Cavalcante
Simple change that shows all the enums used in the transform code and helps to better understand the role of the members of the struct TransInfo. It also allows the IDE to show the name of the value represented by the member instead of a number that needs to be consulted. Differential Revision: https://developer.blender.org/D10312
2021-02-08Merge branch 'blender-v2.92-release'Jacques Lucke
2021-02-08Fix T85368: map range node clamps incorrectly in geometry nodesdf0bce3f7d0Sam Miller
When clamp is enabled, it should clamp between the output min and max and not between 0 and 1. Differential Revision: https://developer.blender.org/D10324
2021-02-08Merge branch 'blender-v2.92-release'Richard Antalik
2021-02-08Fix T85426: Speed effect stretch to input not workingRichard Antalik
`seq_effect_speed_get_strip_content_length()` checked only for number of inputs of target strip, even if it's not an effect. Only effects are treated in different way, so check for type as well. Broken by 93c10797dc35e17bbd96f3711a151acf2d184848 Reviewed By: sergey Differential Revision: https://developer.blender.org/D10356
2021-02-08Mask: Use control point position when handle is selectedSebastian Koenig
This is something what comes after an experiment, which makes behavior more desirable. Basically, for Lock-to-Selection functionality always use control point position if any of control point itself or handles are selected. Initial patch from Sebastian, modification from Sergey. Differential Revision: https://developer.blender.org/D10265
2021-02-08Cleanup: Remove unused tree element typesJulian Eisel
These weren't used since ages. Comment out the DNA define (value shouldn't be reused to avoid compatibility breakage) and remove icon code for the types.
2021-02-08Cleanup: Use enum for Outliner tree-store element typesJulian Eisel
We generally prefer using enums over precompiler defines. This adds an actual type for the values, which the compiler can use to throw warnings, give better messages, etc.
2021-02-08Cleanup: Remove dead code for keymap Outliner display modeJulian Eisel
This wasn't used for a long time and there are no plans to bring this back.
2021-02-08Code quality: Refactor asset operators using C++Julian Eisel
* Attempt to improve readability by using focused, coherent helper classes. * Replace ListBase with blender::Vector, which is more efficient and has a better API. * Split user reporting from error checking. * Use namespace (as we usually do for C++ code). * Remove unused headers
2021-02-08Cleanup: Alphabetize function orderHans Goudey
2021-02-08Forgot to free a bvhtree with previous commit.Howard Trickey
2021-02-07Fix T84493 et al: New Boolean on Suzanne.Howard Trickey
While Boolean is not guaranteed to work if the operands are not volume-enclosing (technically: PWN - piecewise constant winding number), it needs to do something in those cases. This change makes more cases meet user expectations in T84493, T64544, T83403, T82642 (though very slow on that one). The original new boolean code used "generalized winding number" for this fallback; replaced this with code that uses raycasting. Raycasting would have been faster, but for unfortunately also switchd to per-triangle tests rather than per-patch tests since it is possible (e.g., with Suzanne) to have patches that are both inside and outside the other shape. That can make it much slower in some cases, sadly.
2021-02-07GPencil: Fix wrong python API for Point weightsAntonio Vazquez
The old property never worked as expected because it was impossible expose the data as props. Now, there are two methods to handle this: weight_get and weight_set Example use: ```import bpy ob = bpy.context.active_object gpd = ob.data gps = gpd.layers[0].frames[0].strokes[0] i = 0 print("Weights\n================================") for pt in gps.points: gps.points.weight_set(vertex_group_index=0, point_index=i, weight=0.5) i +=1 i = 0 for pt in gps.points: weight = gps.points.weight_get(vertex_group_index=0, point_index=i) print(weight) i +=1 ``` Reviewed By: brecht Maniphest Tasks: T84967 Differential Revision: https://developer.blender.org/D10177 b3f989
2021-02-06Code quality: Port recently added utility file to C++Julian Eisel
It seems generally preferred to have new files be created with C++. The only reason I didn't do that when I initially created the files is that I was unsure about some C-API aspect. Also use nullptr instead of NULL.
2021-02-06Code quality: Port recently added asset files to C++Julian Eisel
It seems generally preferred to have new files be created with C++. The only reason I didn't do that when I initially created the files is that I was unsure about some C-API aspect. Also includes some minor C++ related cleanup (nullptr instead of NULL, remove redundant `struct` keyword).
2021-02-06Merge branch 'blender-v2.92-release'Falk David
2021-02-06Fix T85378: Shrink/Fatten display number unitsFalk David
Currently the displayed distance when using the shrink/fatten transform operator does not respect the scene units (they would always be in blender units). This changes makes sure the number is displayed in the correct unit. Reviewed By: mano-wii Maniphest Tasks: T85378 Differential Revision: https://developer.blender.org/D10325
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-02-06Cleanup: compare with zero for flag checksCampbell Barton
This is done almost everywhere already, use this more straightforward convention.
2021-02-06Cleanup: malformed web addresses in commentsCampbell Barton
2021-02-06Fix: Disabled NLA Interferes with Action EvalWayde Moss
Introduced by my commit: rB09709a7e64ff This bug effectively enabled the NLA when it should be disabled, when all tracks muted or no strips exist. Specifically, the NLA Action Track settings would be used (extrapolation, blendmode, influence).
2021-02-06NLA: Refactor Transition, Use Snapshot Blend FuncWayde Moss
The function `nlastrip_evaluate_transition()` has been slightly modified to use `nlasnapshot_blend()` instead of it's own special blending function `nlaeval_snapshot_mix_and_free()`. No user functional changes Reviewed By: sybren, #animation_rigging Differential Revision: https://developer.blender.org/D10221
2021-02-05Fix T85380: NLA Evaluation Missing Null CheckWayde Moss
Introduced by commit: rB40b7929cc040
2021-02-05Image: Flip image operatorPablo Dobarro
This implements an operator to flip the contents of an image buffer. It supports flipping the image horizontally and vertically. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10310
2021-02-05GPencil: New python API to force stroke triangulation data updateAntonio Vazquez
In some python scripts, the coordinates of the points are manipulated, but there are no way to force the recalculation and need hack to force the refresh. The new api allows to call to the refresh function directly. example: `gp_stroke.points.update()`
2021-02-05Depsgraph: Remove no-op evaluation functionSergey Sharybin
Make the SHADING_PARAMETERS operation on node tree a real no-op. The function used as a callback was only doing a debug print. The issue with this function was that an original ID was passed as an argument. This is a violation of design, and if anything it should be left up to the implementation to check whether depsgraph is active. There are no functional changes for users in the interface. The only difference is that the debug print will no longer happen.
2021-02-05Cleanup: Use raw string literalSergey Sharybin
Resolves modernize-raw-string-literal Clang-Tidy warning The way warning works is it suggests to use raw literal when overhead of having escape characters is higher than the overhead of having raw literal syntax (talking about code size overhead). This means that the warning will not trigger for "foo\"bar". Differential Revision: https://developer.blender.org/D10322
2021-02-05Cleanup: Use lambda instead of function bindSergey Sharybin
More detailed explanation why it is a preferred way of coding nowadays can be found at https://clang.llvm.org/extra/clang-tidy/checks/modernize-avoid-bind.html Resolves modernize-avoid-bind Clang-Tidy warning. Differential Revision: https://developer.blender.org/D10320
2021-02-05DNA: support structs with a size of 1 or 2 bytes.Jacques Lucke
Before the smallest possible dna struct size was 4 bytes. Differential Revision: https://developer.blender.org/D10287
2021-02-05Cleanup: Minimize seq->tmp usageRichard Antalik
Using this persistent field in `select_more_less_seq__internal` was inapropriate in this case. Split select more/less and linked code, because it was mixed in `select_more_less_seq__internal()` These operators work in completely different way. `select_linked_internal()` doesn't use seq->tmp at all. `seq->tmp` was used to mask strips selected by operator while iterating. Use GSet to store temporary data instead of `seq->tmp`. Reviewed By: sergey Differential Revision: https://developer.blender.org/D10326
2021-02-05Geometry Nodes: add Volume to Mesh nodeJacques Lucke
This node takes a volume and generates a mesh on it's "surface". The surface is defined by a threshold value. Currently, the node only works on volumes generated by the Points to Volume node. This limitation will be resolved soonish. Ref T84605. Differential Revision: https://developer.blender.org/D10243
2021-02-05Geometry Nodes: support fixed pivot axis in Align Rotation to Vector nodeJacques Lucke
When the pivot axis is not set to auto, the node will try to align the rotation to vector as best as possible, given the selected rotation axis. Ref T85211. Differential Revision: https://developer.blender.org/D10292
2021-02-05Cleanup: Use transparent functorSergey Sharybin
Resolves modernize-use-transparent-functors Clang-Tidy warning. Differential Revision: https://developer.blender.org/D10323
2021-02-05Geometry Nodes: Add Attribute Proximity NodeVictor-Louis De Gusseme
This node calculates a distance from each point to the closest position on a target geometry, similar to the vertex weight proximity modifier. Mapping the output distance to a different range can be done with an attribute math node after this node. A drop-down changes whether to calculate distances from points, edges, or faces. In points mode, the node also calculates distances from point cloud points. Design task and use cases: T84842 Differential Revision: https://developer.blender.org/D10154
2021-02-05Cleanup: Clang-tidy modernize-use-default-member-initAnkit Meel
Using assignment syntax as we don't use `{}` initialization yet. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9501
2021-02-05Merge branch 'blender-v2.92-release'Jeroen Bakker
2021-02-05Fix T85260: Viewport render does not draw backgroundJeroen Bakker
Regression introduced by {rBed809866b172} where overlays weren't drawn when overlays are turned off. The background in wireframe, solid (always) and material preview and render preview (when not using scene world) are also part of the overlays.
2021-02-05Merge branch 'blender-v2.92-release'Philipp Oeser
2021-02-05Fix T85396: Display Texture Paint UV only working in editmodePhilipp Oeser
Caused by rBf83aa830cd00. Since above commit, only meshes in editmode were considered for drawing (because BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs was used), but the option needs to work for texture paint mode as well, so use BKE_view_layer_array_from_objects_in_mode_unique_data instead on pass the draw_ctx->object_mode. note: there is no good filter_fn to check if we have UVs if mesh is not in editmode, this shouldnt cause much of a performance hit though. Maniphest Tasks: T85396 Differential Revision: https://developer.blender.org/D10319
2021-02-05Cleanup: use 'r_' prefix for return arguments, order lastCampbell Barton
2021-02-05Cleanup: outdated/unhelpful commentsCampbell Barton
2021-02-05Fix T82973: Strips overlap after transformingRichard Antalik
When transforming multiple strips to limits of sequencer timeline they get squashed into one channel. Store selection minimum and maximum channel in TransSeq and limit transformation so no strip can be transformed beyond timeline boundary. Reviewed By: Sergey, mano-wii Differential Revision: https://developer.blender.org/D10013