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-01-25Fix depsgraphs sharing IDs via evaluated edit meshSergey Sharybin
The evaluated mesh is a result of evaluated modifiers, and referencing other evaluated IDs such as materials. It can not be stored in the EditMesh structure which is intended to be re-used by many areas. Such sharing was causing ownership errors causing bugs like T93855: Cycles crash with edit mode and simultaneous viewport and final render The proposed solution is to store the evaluated edit mesh and its cage in the object's runtime field. The motivation goes as following: - It allows to avoid ownership problems like the ones in the linked report. - Object level is chosen over mesh level is because the evaluated mesh is affected by modifiers, which are on the object level. This patch allows to have modifier stack of an object which shares mesh with an object which is in edit mode to be properly taken into account (before the change the modifier stack from the active object will be used for all objects which share the mesh). There is a change in the way how copy-on-write is handled in the edit mode to allow proper state update when changing active scene (or having two windows with different scenes). Previously, the copt-on-write would have been ignored by skipping tagging CoW component. Now it is ignored from within the CoW operation callback. This allows to update edit pointers for objects which are not from the current depsgraph and where the edit_mesh was never assigned in the case when the depsgraph was evaluated prior the active depsgraph. There is no user level changes changes expected with the CoW handling changes: should not affect on neither performance, nor memory consumption. Tested scenarios: - Various modifiers configurations of objects sharing mesh and be part of the same scene. - Steps from the reports: T93855, T82952, T77359 This also fixes T76609, T72733 and perhaps other reports. Differential Revision: https://developer.blender.org/D13824
2021-09-23Paint: prevent RenderResults and Viewers where unappropriatePhilipp Oeser
Using a RenderResult (or a Viewer) was never really working (think you cant get a real ImBuff from these) -- cannot use it as a clone, stencil or canvas [Single Image paint texture slot]. In the case of using it as a 2D paint clone image this would also crash [due to the Image Editor drawing refactor in 2.91]. Now [in the spirit of T73182 / D11179], prevent using these where unappropriate by using rna pointer polling functions. Also add a security check for the 2D paint clone image crash in case a stencil ImBuff cannot be provided for some reason, but generally old files are now patched in do_versions_after_linking_300 (thx @brecht!). Fixes T91625. Maniphest Tasks: T91625 Differential Revision: https://developer.blender.org/D12609
2021-08-25BLF: Remove ASCII-only Code PathsHarley Acheson
Remove redundant code for drawing text strings that contain only ASCII. See D12293 for much more detail. Differential Revision: https://developer.blender.org/D12293 Reviewed by Campbell Barton
2021-07-13Cleanup: replace BKE_customdata.h in BKE_editmesh.hCampbell Barton
Only DNA_customdata_types.h is needed for BMEditMesh.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-03-15Fix T86542: Crash going to UV editing workspace with an instancer thatPhilipp Oeser
is hidden from the viewport Check visibilty (as done in workbench_cache_populate) in overlay_edit_uv_cache_populate as well. Maniphest Tasks: T86542 Differential Revision: https://developer.blender.org/D10724
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-02-15Merge branch 'blender-v2.92-release'Falk David
2021-02-15Fix T85499: Crash on switching to edit mode with uv editor openFalk David
A fix for T83187 (rBf83aa830) assumed in the overlay code of the uv editor that the object was a mesh when it did not have to be - causing a crash. The fix makes sure that the object is a mesh. Reviewed By: jbakker, campbellbarton Maniphest Tasks: T85499, T85495 Differential Revision: https://developer.blender.org/D10369
2021-02-06Cleanup: compare with zero for flag checksCampbell Barton
This is done almost everywhere already, use this more straightforward convention.
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-01-27Cleanup: Moved update ratio stretching overlay to cache_finishJeroen Bakker
2021-01-27Fix T83187: Unselected UVs shows selected on linked meshes.Jeroen Bakker
When uv editing objects that share the same mesh only the selection state can get confused. The cause is that the UV editor uses a particular order of objects and store its state in the first object of a mesh it hasn't handled. During drawing this state is updated into the GPU buffers. In the case of linked meshes it can happen that the GPU buffers are updated based on the object that does not have the correct selection state making th selection VBOs incorrect. This patch adds a work around that uses the order that the UV editor is also using so the GPU buffers are built with the right data.
2021-01-24Fix UV editor vertex/face drawing ignoring UI scaleCampbell Barton
2021-01-13Cleanup: spellingCampbell Barton
2021-01-05Fix T84053: Mask overlay in image editor not workingJeroen Bakker
The mask overlay wasn't part of the overlay engine. The reasoning nehind this was that more editors used the mask overlay and most of them used old drawing code. This patch adds the mask overlay drawing to the draw overlay engine. This code path will only be used by the image editor VSE, Compositor and Movie Clip editor will still use the previous method. During this patch some alternatives have been researched: 1. `ED_mask_draw_region`: this would lead to different code paths when drawing in the image editor, and some hacks to retrieve the correct framebuffer. 2. Add mask drawing to image engine: Would lead to incorrect color management when viewing the mask. 3. Add mask drawing to image engine and overlay engine: Would lead to duplicated code. 4. Add mask drawing to overlay engine and for combined overlay select the correct framebuffer. Option 4 was chosen as the exception (switching framebuffers) can be done without hacks. The code stays clean.
2020-11-18Fix T82810: UV Editor, Crash with switching between single image and UDIM tileJeroen Bakker
Active tile could be NULL when it was on the second tile before switching back and forth between the Image/UDIM. In the future we might also check that the active_tile_index is always valid.
2020-11-17Fix T82064: Add Image Clone tool to overlay engineJeroen Bakker
The clone tool in the image editor can show a second texture on top of the image. This wasn't ported and now results into alpha and depth issues. This fix adds the clone tool drawing to the overlay engine. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D9352
2020-10-13Fix T81669: Vertex size in UV Editor changes using Face Dot Size in themesPhilipp Oeser
Probably copy-paste error in rBd6525e8d133b. Maniphest Tasks: T81669 Differential Revision: https://developer.blender.org/D9190
2020-10-07UV/Image Editor: Overlay PopoverJeroen Bakker
The overlay options in the image/uv editor is hidden in side panels and menus. Sometimes this panel is even hidden, while still useful. The goal of this task is to introduce an overlay pop-over just like the overlay-popover of the 3d viewport. Popover has * UV Stretching (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode) * Display As (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode) * Show Modified (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode) * Show UV Edges (including opacity slider; available UV, View, Paint, when active object mode is a mesh and in OB_EDIT mode) * Udim tiles when no image is available. Like the 3d viewport, there will be a editor toggle to enable/disable the overlays For compatibility reasons the RNA properties are added to both the `SpaceImage.uv_editor` amd `SpaceImage.overlay`. On DNA level they are still stored in the SpaceImage. only new properties are added to the SpaceImageOverlay struct. During the next major release we could remove these options from `SpaceImage.uv_editor`. This should be noted in the Python section of release notes. Reviewed By: Julian Eisel, Pablo Vazquez Differential Revision: https://developer.blender.org/D8890
2020-09-25Fix T81126: Assert going to Texture Paint workspace without a UVMapJeroen Bakker
Assert happened as it could not create uv batches without an UVMap. Solution is to only request those batches when the UVMaps are available.
2020-09-14Fix T80770: UV Image Editor: Display Texture Paint UVs Not WorkingJeroen Bakker
When developing the image draw engine I wasn't aware of this option. But now it is back.
2020-09-11Image Editor: Smooth Wire User PreferencesJeroen Bakker
The old image editor has an option to enable the smooth wire drawing. This option was stored per editor and disabled by default. This patch connects the smooth wires in the UV/Image editor to `User Prefereces -> Viewport -> Quality -> Smooth Wire [] Overlay`. The old option is left in place and will be removed when the old image editor drawing code will be removed before BCon 3.
2020-09-11Use DrawManager for Image/UV EditorJeroen Bakker
This project moves the current UV/Image editor drawing to the draw manager. Why would we do this: **Performance**: Current implementation would draw each texel per time. Multiple texels could be drawn per pixel what would overwrite the previous result. You can notice this when working with large textures. Repeat image drawing made this visible by drawing for a small period of time and stop drawing the rest. Now the rendering is fast and all repeated images are drawn. **Alpha drawing**: Current implementation would draw directly in display space. Giving incorrect results when displaying alpha transparent images. This addresses {T52680}, {T74709}, {T79518} The image editor now can show emission only colors. See {D8234} for examples. **Current Limitations** Using images that are larger than supported by your GPU are resized (eg larger than 16000x16000 are resized to 8k). This leaves some blurring artifacts. It is a low priority to add support back of displaying individual pixels of huge images. There is a design task {T80113} with more detail. **Implementation overview** Introduced an Image Engine in the draw module. this engine is responsible for drawing the texture in the main area of the UV/Image editor. The overlay engine has a edit_uv overlay which is responsible to draw the UV's, shadows and overlays specifically for the UV Image editor. The background + checker pattern is drawn by the overlay_background. The patch will allow us to share overlays between the 3d viewport and UV/Image editor more easily. In most cases we just need to switch the `pos` with the `u` attribute in the vertex shader. The project can be activated in the user preferences as experimental features. In a later commit this will be reversed. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8234