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
2022-02-15Merge branch 'master' into bli-math-basic-typesHans Goudey
2022-02-15BLI: Change dependencies in vector math filesHans Goudey
This patch reverses the dependency between `BLI_math_vec_types.hh` and `BLI_math_vector.hh`. Now the higher level `blender::math` functions depend on the header that defines the types they work with, rather than the other way around. The initial goal was to allow defining an `enable_if` in the types header and using it in the math header. But I also think this operations to types dependency is more natural anyway. This required changing the includes some files used from the type header to the math implementation header. I took that change a bit further removing the C vector math header from the C++ header; I think that helps to make the transition between the two systems clearer. Differential Revision: https://developer.blender.org/D14112
2022-02-15Cleanup: Rename file used for calculating mesh edgesHans Goudey
This commit renames `mesh_validate.cc` to `mesh_calc_edges.cc`. I would like to move `mesh_validate.c` to C++, but it makes sense to keep this specific algorithm in a smaller file.
2022-02-15Curves: add initial sculpt modeJacques Lucke
This adds a new sculpt mode to the experimental new curves object. Currently, this mode can only be entered and exited, nothing else. The main initial purpose of this node will be to use it for hair grooming. The patch also adds the `editors/curves/` directory for the new curves object, which will be necessary for many other things as well. I added a completely new mode (`OB_MODE_SCULPT_CURVES`), because `OB_MODE_SCULPT` seems to be rather specific to meshes, and reusing it doesn't seem worth the trouble. The tools/brushes used in mesh vs. curves sculpt mode are quite distinct as well. I had to add DNA_userdef_enums.h to make the patch compile with C++ (forward declaration of enums isn't allowed). This follows the same pattern that we use for other enums in dna. Differential Revision: https://developer.blender.org/D14107
2022-02-15RNA: add RNA_collection_is_empty & RNA_property_collection_is_emptyCampbell Barton
Some collections needed to be iterated over to count their length. Provide a function to check if the collection is empty to avoid this.
2022-02-15Merge branch 'blender-v3.1-release'Campbell Barton
2022-02-15Fix T95791: Unable to switch between multiviews.Jeroen Bakker
Root cause is copy pasting buggy code.
2022-02-15Fix T94085: Crash with empty stroke listCampbell Barton
2022-02-15Fix T95791: Unable to switch between multiviews.Jeroen Bakker
Root cause is copy pasting buggy code.
2022-02-15CMake: create readme.html with configure_fileAnkit Meel
Since the output file stays unmodified for most developer builds, install step installed it redundantly. Create readme.html using `configure_file`: - Now it's modified only if final output changes (handled by CMake). - If input file (from git) or blender version changes, it //will// be modified. Also don't re-implement what CMake can do. Reviewed By: campbellbarton, LazyDodo Differential Revision: https://developer.blender.org/D13863
2022-02-15Cleanup: unused argument warningsCampbell Barton
2022-02-15Cleanup: minor changes to Python argument parsing loopCampbell Barton
- Increment the argument index at the end of the loop. Otherwise using the index after incrementing required subtracting 1. - Move error prefix creation into a function: `pyrna_func_error_prefix` so it's possible to create an error prefix without duplicate code. This simplifies further changes for argument parsing from D14047.
2022-02-15Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-15Fix T95720: Spreadsheet missing volume grid infoHans Goudey
The cell drawing code in 474adc6f883c2d5a854d7 was missing an implementation for virtual arrays of strings.
2022-02-15GLShaderInterface: Fix undefined behavior when attributes are optimized away.Clément Foucault
Optimized out attributes returns an invalid location `-1` resulting in an undefined behavior shift.
2022-02-15Fix ambiguous definitionsHans Goudey
2022-02-15Merge branch 'blender-v3.1-release'Clément Foucault
2022-02-15GLCompute: Apply state before dispatchClément Foucault
2022-02-15GLDebug: Fix severity checkClément Foucault
The check was reversed, leading to less errors being reported.
2022-02-15GPUTexture: Fix missing enum cases in `to_component_len()`Clément Foucault
This might have caused undersized buffer if using the wrong formats with `GPU_texture_read()`.
2022-02-15BLI: Implement templated math functions for basic typesHans Goudey
This is meant to complement the `blender::math` functions recently added by D13791. It's sometimes desired to template an operation to work on vector types, but also basic types like `float` and `int`. This patch adds that ability with a new `BLI_math_base.hh` header. Particularly useful examples are `midpoint` and `interpolate`, but I'm sure others will be added in the future. Implementing the functions separately, rather than as `if constexpr` branches in the existing header is meant to be more scalable, for the possibility of even more math types in the future.
2022-02-15BLI: Change dependencies in vector math filesHans Goudey
This patch reverses the dependency between `BLI_math_vec_types.hh` and `BLI_math_vector.hh`. Now the higher level `blender::math` functions depend on the header that defines the types they work with, rather than the other way around. This required changing the includes some files used from the type header to the math implementation header. I took that change a bit further removing the C vector math header from the C++ header; I think that helps to make the transition between the two systems clearer.
2022-02-15Cleanup: Use C++ math functionsHans Goudey
Use functions from the `math` and `std` namespaces instead of from `BLI_math_vector.h`.
2022-02-14Cleanup: Pass const Scene to mesh evaluationHans Goudey
2022-02-14Merge branch 'blender-v3.1-release'Sergey Sharybin
2022-02-14Fix T95756: Crash inserting geometry node after linking modifierSergey Sharybin
The root issue was caused by a mistake in modifier copy data which was wrongly re-generating source modifier data identifier. The c8cca8885181 simply exposed a bug in code which always was there since the modifiers session UUID was introduced. Shows an importance of const qualifier :)
2022-02-14Merge branch 'blender-v3.1-release'Thomas Dinges
2022-02-14Cleaunp: Modify commentAntonio Vazquez
2022-02-14Fix T94479: GPU Subdivision surface modifier does not apply to Cycles rendersKévin Dietrich
Since now we delegate the evaluation of the last subsurf modifier in the stack to the draw code, Cycles does not get a subdivided mesh anymore. This is because the subdivision wrapper for generating a CPU side subdivision is never created as it is only ever created via `BKE_object_get_evaluated_mesh` which Cycles does not call (rather, it accesses the Mesh either via `object.data()`, or via `object.to_mesh()`). This ensures that a subdivision wrapper is created when accessing the object data or converting an Object to a Mesh via the RNA/Python API. Reviewed by: brecht Differential Revision: https://developer.blender.org/D14048
2022-02-14GPencil: Fill Dilate using negative values contract the fill areaAntonio Vazquez
This is requested by artist for some animation styles where is necessary to fill the area, but create a gap between fill and stroke. Also some code cleanup and fix a bug in dilate for top area. Reviewed By: pepeland, mendio Differential Revision: https://developer.blender.org/D14082
2022-02-14Fix T95320: CacheFile templates crash when used through PythonKévin Dietrich
The crash is caused as we did not check that the RNA pointer is null before trying to use it. This moves the existing checks from the modifier panels into the template functions so the logic is a bit centralized.
2022-02-14Merge remote-tracking branch 'origin/blender-v3.1-release'Kévin Dietrich
2022-02-14Fix T95177: GPU subdiv crashes mirror modifier in edit-modeKévin Dietrich
The issue has two causes: on one hand origin indices were not handled properly, on the other hand the extraction type (Mesh, BMesh, or mapped) was not detected correctly. For the second case reuse the MeshRenderData creation from the coarse code path so that we make the same decisions. Loose geometry extraction had to be updated to properly handle the BMesh cases. For the origin indices, in some cases (for edges and faces), the arrays used by the subdivision code already have the origin indices baked into them, so mapping them a second time through the origin index layer is wrong, and could cause out of bounds accesses. For vertices especially, we would use two arrays: one for mapping subdivision vertices to coarse vertices, and another one to map coarse vertices to subdivision loops used for the selection index buffer. The second one is now removed (which saves a bit of memory) as it is did not have the proper data setup for use with the origin indices and we can easily compute it using the first array anyway.
2022-02-14Fix (studio reported) crash in new resync code.Bastien Montagne
We do not always resync/replace the root ID of a hierarchy now that we do partial resync.
2022-02-14Merge branch 'blender-v3.1-release'Bastien Montagne
2022-02-14Fix T95601: Missing handling of keyingsets ID pointers in ↵Bastien Montagne
lib_query/foreach_id code. This will have to be backported to 2.93 and possibly 2.83 if possible.
2022-02-14Merge remote-tracking branch 'origin/blender-v3.1-release'Sybren A. Stüvel
2022-02-14Fix segfault calling `id_properties_ui("prop").update()`Sybren A. Stüvel
Fix segfault when calling `some_id.id_properties_ui("propname").update()`, i.e. call the `update()` function without any keyword arguments. In such a case, Python passes `kwargs = NULL`, but `PyDict_Contains()` is not `NULL`-safe.
2022-02-14Merge branch 'blender-v3.1-release'Jeroen Bakker
2022-02-14Cleanup use c style comments.Jeroen Bakker
2022-02-14Fix T95725: Changing render slot doesn't update displayed image.Jeroen Bakker
Fixed by checking the requested pass, layer and view against the previous used one.
2022-02-14Phase out IMA_GPU_REFRESH.Jeroen Bakker
IMA_GPU_REFRESH is replaced by BKE_image_partial_update_mark_full_update and should not be used anymore.
2022-02-14Merge branch 'blender-v3.1-release'Jeroen Bakker
2022-02-14Fix T95699: Compostior backdrop not updated.Jeroen Bakker
The Viewer marked the gpu texture to be out of date. But it should have used the mark_full_update as the gpu textures are only used by the render/draw engines. The image/node editor uses the image engine that have its own GPU textures.
2022-02-14Image Engine: Remove region_uv_bounds.Jeroen Bakker
They have been replaced by clipping_uv_bounds. Using region_uv_bounds could lead to problems when drawing the compositor backdrop.
2022-02-14Image Engine: Limit the number of interal textures.Jeroen Bakker
Currently one a single texture slot is used to update the screen. Current design is implemented to use multiple textures. for now limit the number of texture slots to 1.
2022-02-14Merge branch 'blender-v3.1-release'Jacques Lucke
2022-02-14Fix T95749: missing update when normal node changesJacques Lucke
This node is a bit of a weird case, because it uses the value stored in an output socket as an input. So when we want to determine if the Dot changed, we also have to check if the Normal output changed. A cleaner solution would be to refactor this by either storing the normal on the node directly (instead of in an output socket), or by exposing it by a separate input. This refactor should be done separately though.
2022-02-13Cleanup: Clang tidyHans Goudey
Use using instead of typedef, remove redundant string init, use "empty", address qualified auto, use nullptr.
2022-02-13Cleanup: Optimize gl query code pathJesse Yurkovich
Currently whenever gl queries are performed for the viewport, a large 1024 byte array is allocated to store the query results (256 of them). Unfortunately, if any gizmo using a `draw_select` callback is active (e.g. the transform gizmos), these queries (and allocations) will occur during every mouse move event. Change the vector to allow for up to 16 query results before making an allocation. This provides enough space for every built-in gizmo except Scale Cage (which needs 27 queries). It also removes unnecessary allocations from two other related vectors used during query processing. Differential Revision: https://developer.blender.org/D13784