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
2022-06-03Cleanup: spelling in commentsCampbell Barton
2022-06-03Cleanup: remove unused, commented MTexFace assignmentsCampbell Barton
2022-06-03Merge branch 'blender-v3.2-release'Campbell Barton
2022-06-03Fix T98558: island selection in UV editor can crashPhilipp Oeser
Regression in [0]. When zoomed in, we can be within the face of an island but too far from an edge, in this case uv_find_nearest_face_multi_ex is used instead of uv_find_nearest_edge_multi with the consequence that hit.l cannot be used in uvedit_uv_select_test (it is NULL). Instead, use uvedit_face_select_test instead in this case. [0]: d356edf420ba13b3a544dcc598a0e31a36e1d86c Reviewed By: campbellbarton Ref D15100
2022-06-02Cleanup: replace ParamBool and PBool with bool for GEO_uv APIChris Blackbourn
Also improve const correctness and type correctness. Reviewed By: brecht Ref D15075
2022-06-01Cleanup: spelling in comments, use doxy sectionsCampbell Barton
2022-05-26Cleanup: `struct PHandle` merged with alias `typedef void ParamHandle`Chris Blackbourn
Reviewed By: brecht Ref D15021
2022-05-23Cleanup: remove "texture" from ED_mesh_uv_texture_* funcitonsCampbell Barton
This name made sense when UV's and textures were stored in the same layer (MTFace & TFace).
2022-05-18Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-18Fix T98214: UV selection crash with wire edgesChris Blackbourn
Regression in ffaaa0bcbf477c30cf3665b9330bbbb767397169 which removed the NULL pointer check.
2022-05-13Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-13Fix T89909: Circle Select tool status bar doesn't match the operationsCampbell Barton
Assign get_name functions for select picking and circle select so modifier keys show the result of holding the modifiers.
2022-05-10Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-10Fix T86358: Use per face aspect correction for primitive UV projectionsChris Blackbourn
During UV unwrapping, Cube Projection, Sphere Projection, Cylinder Projection and Project From View (in the 3D Viewport), when "Correct Aspect" toggle is active, it now uses a query cache to perform a per-face aspect ratio ("per_face_aspect") correction for the active image of each face. Reviewed By: campbellbarton Ref D14852
2022-05-04Transform: use a threshold for UV snappingGermano Cavalcante
Unlike 3Dview snapping, UV snapping is always done to the UV closest to the mouse cursor, no matter the distance. From the user's point of view, this appears to be an inconsistency (See {T93538}). Therefore, set a minimum distance for snapping and, as in 3D View and highlight the snap with a drawing of a circle. Release Note: https://wiki.blender.org/wiki/Reference/Release_Notes/3.3/Modeling Reviewed By: #uv_editing, campbellbarton Maniphest Tasks: T93538 Differential Revision: https://developer.blender.org/D13873
2022-05-03Fix T85379: Cube projection size parameter is wrongCampbell Barton
The input size was doubled & inverted.
2022-05-02GPUShader: Port dashed line shaders to use shaderCreateInfoClément Foucault
This should have no functional changes. This reduce the complexity of the shader by only supporting 2 colors. We never use more than 2 color in practice and this makes usage not require a UBO.
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-03-31Cleanup: spelling, trailing space for comment-blocksCampbell Barton
2022-03-30Cleanup: use utility function to initialize SelectPick_ParamsCampbell Barton
2022-03-30Cleanup: Move UV edit parameterize code to geometry moduleAleksi Juvani
This will allow reusing it elsewhere, such as in a geometry node. Differential Revision: https://developer.blender.org/D14453
2022-03-23UV: support "Tweak Tool: Left Mouse Select & Move"Campbell Barton
- Follow the same conventions as the 3D viewport for UV selection (using SelectPick_Params internally). - Use WM_operator_properties_mouse_select for selection properties.
2022-03-22Fix T96308: Mesh to BMesh conversion doesn't calculate vertex normalsHans Goudey
Currently there is a "calc_face_normal" argument to mesh to bmesh conversion, but vertex normals had always implicitly inherited whatever dirty state the mesh input's vertex normals were in. Probably they were most often assumed to not be dirty, but this was never really correct in the general case. Ever since the refactor to move vertex normals out of mesh vertices, cfa53e0fbeed7178c7, the copying logic has been explicit: copy the normals when they are not dirty. But it turns out that more control is needed, and sometimes normals should be calculated for the resulting BMesh. This commit adds an option to the conversion to calculate vertex normals, true by default. In almost all places except the decimate and edge split modifiers, I just copied the value of the "calc_face_normals" argument. Differential Revision: https://developer.blender.org/D14406
2022-03-18Cleanup: Compilation warningsSergey Sharybin
Mainly -Wset-but-unused-variable. Makes default compilation on macOS way less noisy. Differential Revision: https://developer.blender.org/D14357
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-03-14RNA: Generate property declerations header, solving msg-bus C++ incompatibilityJulian Eisel
Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all RNA properties. This can be included in regular source files when needing to reference RNA properties statically. This solves an issue on MSVC with adding such declarations in functions, like we used to do. See 800fc1736748. Removes any such declarations and the related FIXME comments. Reviewed By: campbellbarton, LazyDodo, brecht Differential Revision: https://developer.blender.org/D13837
2022-03-11Cleanup: use M_PI_2 and M_PI_4 where possibleHallam Roberts
The constant M_PI_4 is added to GLSL to ensure it works there too. Differential Revision: https://developer.blender.org/D14288
2022-03-09Cleanup: use ELEM macroCampbell Barton
2022-03-08Cleanup: Clang tidyHans Goudey
2022-03-08Cleanup: pass const scene argument to UV selection functionsCampbell Barton
2022-03-08Cleanup: prefer UNUSED_VARS_NDEBUG for debug only variablesCampbell Barton
Otherwise it's possible to accidentally use these variables in debug builds, breaking release builds.
2022-03-07Cleanup: move asssertion-test-only variable into `#ifndef NDEBUG` blockSybren A. Stüvel
Move `ToolSettings *ts` into an `#ifdef NDEBUG` block, as it's only used for a `BLI_assert` call.
2022-03-04Cleanup: Unused variable warningsHans Goudey
2022-03-04Cleanup: spelling in comments, function nameCampbell Barton
2022-03-03UV: Edge selection supportSiddhartha Jejurkar
This patch adds edge selection support for UV editing (refer T76545). Developed as a part of GSoC 2021 project - UV Editor Improvements. Previously, selections in the UV editor always flushed down to vertices and this caused multiple issues such as T76343, T78757 and T26676. This patch fixes that by adding edge selection support for all UV operators and adding support for flushing selections between vertices and edges. Updating UV select modes is now done using a separate operator, which also handles select mode flushing and undo for UV select modes. Drawing edges (in UV edge mode) is also updated to match the edit-mesh display in the 3D viewport. Notes on technical changes made with this patch: * MLOOPUV_EDGESEL flag is restored (was removed in rB9fa29fe7652a). * Support for flushing selection between vertices and edges. * Restored the BMLoopUV.select_edge boolean in the Python API. * New operator to update UV select modes and flushing. * UV select mode is now part of editmesh undo. TODOs added with this patch: * Edge support for shortest path operator (currently uses vertex path logic). * Change default theme color instead of reducing contrast with edge-select. * Proper UV element selections for Reveal Hidden operator. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12028
2022-03-03WM: use pass-through for cursor placement operatorCampbell Barton
This is needed since 4d0f846b936c9101ecb76a6db962aac2d74a460a however change in the operator instead of the event handler is correct, as accepting a press event should suppress drag events unless the pass-through flag is set. This is how select & tweak already works.
2022-02-25Cleanup: use flags for wmEvent modifier keysCampbell Barton
Using flags makes checking multiple modifiers at once more convenient and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag which have been removed. It also simplifies checking if modifier keys have changed.
2022-02-16UV: move sticky selection from image space into tool settingsCampbell Barton
Having this setting stored in the image space caused low level selection logic to have to pass around the image space (which could be NULL in some cases). Use the tool-settings instead since there doesn't seem to be much/any advantage in having this setting per-space.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-30Cleanup: Cmake: remove unnecessary definitions for internationalizationAaron Carlisle
Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL` However, the is unnecessary as withen the functions themselves have checks for building without internationalization. This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary. Reviewed By: mont29, LazyDodo Differential Revision: https://developer.blender.org/D13929
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-21Nodes: refactor node tree update handlingJacques Lucke
Goals of this refactor: * More unified approach to updating everything that needs to be updated after a change in a node tree. * The updates should happen in the correct order and quadratic or worse algorithms should be avoided. * Improve detection of changes to the output to avoid tagging the depsgraph when it's not necessary. * Move towards a more declarative style of defining nodes by having a more centralized update procedure. The refactor consists of two main parts: * Node tree tagging and update refactor. * Generally, when changes are done to a node tree, it is tagged dirty until a global update function is called that updates everything in the correct order. * The tagging is more fine-grained compared to before, to allow for more precise depsgraph update tagging. * Depsgraph changes. * The shading specific depsgraph node for node trees as been removed. * Instead, there is a new `NTREE_OUTPUT` depsgrap node, which is only tagged when the output of the node tree changed (e.g. the Group Output or Material Output node). * The copy-on-write relation from node trees to the data block they are embedded in is now non-flushing. This avoids e.g. triggering a material update after the shader node tree changed in unrelated ways. Instead the material has a flushing relation to the new `NTREE_OUTPUT` node now. * The depsgraph no longer reports data block changes through to cycles through `Depsgraph.updates` when only the node tree changed in ways that do not affect the output. Avoiding unnecessary updates seems to work well for geometry nodes and cycles. The situation is a bit worse when there are drivers on the node tree, but that could potentially be improved separately in the future. Avoiding updates in eevee and the compositor is more tricky, but also less urgent. * Eevee updates are triggered by calling `DRW_notify_view_update` in `ED_render_view3d_update` indirectly from `DEG_editors_update`. * Compositor updates are triggered by `ED_node_composite_job` in `node_area_refresh`. This is triggered by calling `ED_area_tag_refresh` in `node_area_listener`. Removing updates always has the risk of breaking some dependency that no one was aware of. It's not unlikely that this will happen here as well. Adding back missing updates should be quite a bit easier than getting rid of unnecessary updates though. Differential Revision: https://developer.blender.org/D13246
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-09Fix T92318: adding layers (UVs, ...) doesn't notify about limitPhilipp Oeser
When adding certain customdata layers (namely UVs, vertex colors and sculpt vertex colors), the user does not get notified the specific limit has been hit (blender just silently does nothing). Now inform the user [decided to not do this in poll() since it could get messy once operators are extended to operate on all selected objects, so left this as a visible error in execute() -- or from python]. Maniphest Tasks: T92318 Differential Revision: https://developer.blender.org/D13147
2021-10-19Fix image cache margin calculationCampbell Barton
This margin was inconsistently calculated: only taking the visible region and interface scale into account in some cases.
2021-10-08Cleanup: remove redundant cursor copy, printCampbell Barton
2021-09-30Cleanup: isolate UDIM parameters into a structCampbell Barton
Passing multiple UDIM arguments into the packing function is awkward especially since the caller may not be using UDIM. Use an argument to store UDIM packing parameters which can be NULL, which operates without any UDIM support. Add a function that extracts these parameters out of the image space allowing for multiple functions to take UDIM parameters in the future.
2021-09-29Cleanup: else-after-returnJacques Lucke
2021-09-29UV: Pack to closest/active UDIMSiddhartha Jejurkar
Implements T78397 Extends the functionality of pack islands operator to allow packing UVs to either the closest or active UDIM tile. This provides 2 new options for packing UVs : * Closest UDIM: Selected UVs will be packed to the UDIM tile they were placed on. If not present on a valid UDIM tile, the UVs will be packed to the closest UDIM in UV space * Active UDIM: Selected UVs will be packed to the active UDIM image tile In case, no image is present in the UV editor, then UVs will be packed to the tile on the UDIM grid where the 2D cursor is located. Reviewed By: campbellbarton Maniphest Tasks: T78397 Ref D12680