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-09-07Cleanup: spelling in comments, correct doxy slashes, replace '/w'Campbell Barton
2022-09-07Cleanup: remove unused Main argument to RNA_path functionsCampbell Barton
Note that lib_override functions have kept the unused argument, but this may be removed too. It impacts many lib_override functions so this can be handled separately.
2022-09-06Cleanup: spelling in comments, formatting, move comments into headersCampbell Barton
2022-09-06GPU: remove 'GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR'Germano Cavalcante
The only difference between `GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR` and `GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions.
2022-09-06GPU: remove 'GPU_SHADER_3D_IMAGE_MODULATE_ALPHA'Germano Cavalcante
`GPU_SHADER_3D_IMAGE_MODULATE_ALPHA` can be seamlessly replaced by `GPU_SHADER_3D_IMAGE_COLOR` with no real harm done.
2022-09-05GPU: convert 'GPU_SHADER_2D_IMAGE_COLOR' to 3DGermano Cavalcante
3D shaders work in both 2D and 3D viewports. This shader is a good candidate to be exposed in Python.
2022-09-05GPU: remove 'GPU_SHADER_2D_SMOOTH_COLOR'Germano Cavalcante
The only real difference between `GPU_SHADER_2D_SMOOTH_COLOR` and `GPU_SHADER_3D_SMOOTH_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions. This will simplify porting shaders to python as it will not be necessary to use a 3D and a 2D version of the shaders. In python the new name for '2D_SMOOTH_COLOR' and '3D_SMOOTH_COLOR' is 'SMOOTH_COLOR', but the old names still work for backward compatibility.
2022-09-05GPU: remove 'GPU_SHADER_2D_IMAGE'Germano Cavalcante
The only real difference between `GPU_SHADER_2D_IMAGE` and `GPU_SHADER_3D_IMAGE` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions. This will simplify porting shaders to python as it will not be necessary to use a 3D and a 2D version of the shaders. In python the new name for '2D_IMAGE' and '3D_IMAGE' is 'IMAGE', but the old names still work for backward compatibility.
2022-09-05GPU: remove 'GPU_SHADER_2D_UNIFORM_COLOR'Germano Cavalcante
The only real difference between `GPU_SHADER_2D_UNIFORM_COLOR` and `GPU_SHADER_3D_UNIFORM_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions. This will simplify porting shaders to python as it will not be necessary to use a 3D and a 2D version of the shaders. In python the new name for '2D_UNIFORM_COLOR'' and '3D_UNIFORM_COLOR' is 'UNIFORM_COLOR', but the old names still work for backward compatibility. Differential Revision: https://developer.blender.org/D15836
2022-09-05I18n: translate untitled file namesDamien Picard
When saving, the default file name is "untitled" regardless of selected language. This can be translated, like many graphical applications do. This applies to: - blend file - alembic file - collada file - obj file - usd file - rendered image - grease pencil export - subtitles export - other Python exports through ExportHelper Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15868
2022-09-01Cleanup: Remove/replace View Layer macros.Monique Dewanchand
This patch is a cleanup required before refactoring the view layer syncing process {T73411}. * Remove FIRSTBASE. * Remove LASTBASE. * Remove BASACT. * Remove OBEDIT_FROM_WORKSPACE. * Replace OBACT with BKE_view_layer_active_object. * Replace OBEDIT_FROM_VIEW_LAYER with BKE_view_layer_edit_object. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15799
2022-08-31Cleanup: break before the default case in switch statementsCampbell Barton
While missing the break before a default that only breaks isn't an error, it means adding new cases needs to remember to add the break for an existing case, changing the default case will also result in an unintended fall-through. Also avoid `default:;` and add an explicit break.
2022-08-30Merge branch 'blender-v3.3-release'Campbell Barton
2022-08-30Fix T100703: Crash in file reading with ID's referenced from the WMCampbell Barton
Don't decrement ID reference counts as any ID references from the window-managers will have already been freed. Reviewed By: mont29 Ref D15808
2022-08-29Fix (studio-reported) crash when linking/appending data in some cases.Bastien Montagne
Recent refactor (rB7be1c8bbae76f49f) removed a null check in WM code, that is mandatory in some cases like e.g. liboverride apply code on linked data.
2022-08-27Cleanup: pass notifiers as constCampbell Barton
2022-08-27Fix assertion when notifiers weren't removed from the notifier queue setCampbell Barton
Since [0] notifiers were cleared and left in the queue, while harmless it meant the call to remove the notifier from the set was redundant. Now set aside a category to tag notifiers as having been cleared and skip them entirely. [0]: 0aaff9a07d3bdf8588cef15d502aeb4fdab22e5e
2022-08-26IDManagement: fix missing WM name validation when using "keep current WM ↵Aras Pranckevicius
list" code path The blendfile_liblink and blendfile_io python tests in debug fired an assert that WMWinMan object was in Main database, but not in the ID name map. This was caused by wm_window_match_do going into case 3 there: the new WM list is completely empty, the old list is not empty, and it was directly using the old/current list (via wm_window_match_keep_current_wm function), without actually registering/validating the objects in it through the name map. Reviewed By: Bastien Montagne Differential Revision: https://developer.blender.org/D15787
2022-08-26IDManagement: fix missing WM name validation when using "keep current WM ↵Aras Pranckevicius
list" code path The blendfile_liblink and blendfile_io python tests in debug fired an assert that WMWinMan object was in Main database, but not in the ID name map. This was caused by wm_window_match_do going into case 3 there: the new WM list is completely empty, the old list is not empty, and it was directly using the old/current list (via wm_window_match_keep_current_wm function), without actually registering/validating the objects in it through the name map. Reviewed By: Bastien Montagne Differential Revision: https://developer.blender.org/D15787
2022-08-26Cleanup: use booleansCampbell Barton
2022-08-24Cleanup: formatCampbell Barton
2022-08-23I18n: make workspaces translatableDamien Picard
This makes workspaces more translatable: - New Workspace menu - header - preset menus - preset entries - workspace names upon factory file template load - new workspace name upon workspace addition To properly translate those names, an extraction function for workspace names from app templates was added as well. (Do not do anything when loading a user-saved file!) Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15727
2022-08-18WM: optimize adding notifier duplication checkCampbell Barton
Use a GSet to check for duplicate notifiers, for certain Python scripts checking for duplicate notifiers added considerable overhead. This is an alternative to D15129 with fewer chances to existing logic.
2022-08-18Cleanup: de-duplicate notifier add functionCampbell Barton
2022-08-18Cleanup: early return, reduce right-shiftCampbell Barton
2022-08-17WM: update comment about window redraw for thumbnailsCampbell Barton
2022-08-17Merge branch 'blender-v3.3-release'Campbell Barton
2022-08-17Merge branch 'blender-v3.3-release'Campbell Barton
2022-08-17Cleanup: spelling in commentsCampbell Barton
2022-08-17Fix freed memory access checking events with debug buildsCampbell Barton
Pressing escape when rendering a viewport animation would access the freed even and crash (with ASAN enabled). Always check the context's window before the event as this is a signal a file was loaded or the window was closed (and it's events freed).
2022-08-17Fix T98462: Save Screenshot (glReadPixels) fails under WaylandCampbell Barton
Use an off-screen buffer for the screen-shot operator. Reading from the front-buffer immediately after calling swap-buffers failed for GHOST/Wayland in some cases. While EGL can request to preserve the front-buffer while drawing, this isn't always supported. So workaround the problem by avoiding use of the front-buffer entirely.
2022-08-17Cleanup: strip blank lines around comment blocksCampbell Barton
2022-08-15Introduce headless OpenGL rendering on LinuxSebastian Parborg
With this patch true headless OpenGL rendering is now possible on Linux. It changes the logic of the WITH_HEADLESS build flag. The headless backend is now always available with regular builds and Blender will try to fall back to it if it fails to initialize other backends while in background mode. The headless backend only works on Linux as EGL is not used on Mac or Windows. libepoxy does support windows and mac, so this can perhaps be remedied in the future. Reviewed By: Brecht, Jeroen, Campbell Differential Revision: http://developer.blender.org/D15555
2022-08-15GPU: replace GLEW with libepoxyChristian Rauch
With libepoxy we can choose between EGL and GLX at runtime, as well as dynamically open EGL and GLX libraries without linking to them. This will make it possible to build with Wayland, EGL, GLVND support while still running on systems that only have X11, GLX and libGL. It also paves the way for headless rendering through EGL. libepoxy is a new library dependency, and is included in the precompiled libraries. GLEW is no longer a dependency, and WITH_SYSTEM_GLEW was removed. Includes contributions by Brecht Van Lommel, Ray Molenkamp, Campbell Barton and Sergey Sharybin. Ref T76428 Differential Revision: https://developer.blender.org/D15291
2022-08-15Cleanup: fix typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D15680
2022-08-12Cleanup: repeated words in commentsCampbell Barton
2022-08-12Cleanup: remove unnecessary ifdefCampbell Barton
2022-08-11Merge branch 'blender-v3.3-release'Brecht Van Lommel
2022-08-11Fix T100130: animation player crash on exitBrecht Van Lommel
GPU_exit is now expected to run within an active GPU context. Also run BLF_exit and IMB_exit first they can use GPU resources and gave ASAN errors. And remove redundant GPU_shader_free_builtin_shaders already handled by GPU_exit.
2022-08-11Fix T66088: Modifier keys ignored when the window doesn't have focusCampbell Barton
Always use modifier keys from the active window, as changes to the modifiers aren't sent to inactive windows. Also resolves modifier keys being lost on window de-activation. Activating the window again would check the previous state of the modifiers which was always cleared as of [0], now clearing is no longer needed. [0]: 472595f1d3533f143bdc84700b26f20a7b2ba1c1
2022-08-09Compositor: Rename compositor build optionOmar Emara
Currently, the compositor can be disabled using the WITH_COMPOSITOR build option. Since, we intent to always build the realtime compositor, we need to make the distinction between both compositors clear. So this patch renames the option to WITH_COMPOSITOR_CPU. Additionally, the check for the option was moved inside the compositor modules' own CMake file in preparation for the realtime compositor code. Differential Revision: https://developer.blender.org/D15622 Reviewed By: Jeroen Bakker, Ray Molenkamp
2022-08-09Cleanup: use own username in code-comment tagsCampbell Barton
2022-08-04Cleanup: Move RNA path functions into own C++ fileJulian Eisel
NOTE: This is committed to the 3.3 branch as part of D15606, which we decided should go to this release still (by Bastien, Dalai and me). That is because these are important usability fixes/improvements to have for the LTS release. Adds `rna_path.cc` and `RNA_path.h`. `rna_access.c` is a quite big file, which makes it rather hard and inconvenient to navigate. RNA path functions form a nicely coherent unit that can stand well on it's own, so it makes sense to split them off to mitigate the problem. Moreover, I was looking into refactoring the quite convoluted/overloaded `rna_path_parse()`, and found that some C++ features may help greatly with that. So having that code compile in C++ would be helpful to attempt that. Differential Revision: https://developer.blender.org/D15540 Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
2022-08-04Fix the menu popup location when dropping blend files under WaylandCampbell Barton
Even though the event's location matched the drop event, the `wmWindow.eventstate` was not updated which was used for the pop-up menu location.
2022-07-30Sculpt: Opaque vertex type for sculptJoseph Eagar
This is a port of sculpt-dev's `SculptVertRef` refactor (note that `SculptVertRef was renamed to PBVHVertRef`) to master. `PBVHVertRef` is a structure that abstracts the concept of a vertex in the sculpt code; it's simply an `intptr_t` wrapped in a struct. For `PBVH_FACES` and `PBVH_GRIDS` this struct stores a vertex index, but for `BMesh` it stores a direct pointer to a BMVert. The intptr_t is wrapped in a struct to prevent the accidental usage of it as an index. There are many reasons to do this: * Right now `BMesh` verts are not logical sculpt verts; to use the sculpt API they must first be converted to indices. This requires a lot of indirect lookups into tables, leading to performance loss. It has also led to greater code complexity and duplication. * Having an abstract vertex type makes it feasible to have one unified temporary attribute API for all three PBVH modes, which in turn made it rather trivial to port sculpt brushes to DynTopo in sculpt-dev (e.g. the layer brush, draw sharp, the smooth brushes, the paint brushes, etc). This attribute API will be in a future patch. * We need to do this anyway for the eventual move to C++. Differential Revision: https://developer.blender.org/D14272 Reviewed By: Brecht Van Lommel Ref D14272
2022-07-29Cleanup: Replace reinterpret_cast<> with static_cast<> in UI codeJulian Eisel
2022-07-29Cleanup: Move RNA path functions into own C++ fileJulian Eisel
Adds `rna_path.cc` and `RNA_path.h`. `rna_access.c` is a quite big file, which makes it rather hard and inconvenient to navigate. RNA path functions form a nicely coherent unit that can stand well on it's own, so it makes sense to split them off to mitigate the problem. Moreover, I was looking into refactoring the quite convoluted/overloaded `rna_path_parse()`, and found that some C++ features may help greatly with that. So having that code compile in C++ would be helpful to attempt that. Differential Revision: https://developer.blender.org/D15540 Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
2022-07-28Curves: enable density brush when first entering curves sculpt modeJacques Lucke
Previously, no tool was selected, which was a bug.
2022-07-27ID namemap: Add check for consistency.Bastien Montagne
Add a util function to check that content of a given Main and the namemaps in it are consistent. Add some asserts calling this check after file read, and after some override operations.
2022-07-27Cleanup: Move wm_dragdrop.c to C++Hans Goudey