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
2021-07-19Cleanup: Separate keyframes_draw and keyframes_keylist.Jeroen Bakker
The keylist functions are used in other places for none drawing related stuff. Fe pose_slide uses it.
2021-07-15Cleanup: Use const for UI icon getter functionJulian Eisel
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-04-13Cleanup: preview rendering, push bContext a bit further down the call stackSybren A. Stüvel
Pass `bContext *C` a bit further down the call stack, to prevent exploding the number of parameters of `ED_preview_icon_render()`. An upcoming change will require access to yet another context member, and this can now be done without adding yet another parameter. No functional changes.
2021-04-07Fix T86463: Colored collection icons don't scale with zoom levelLeon Leno
This patch fixes the issue in T86463 that colored collection icons in the collection search box don't scale according to the zoom level. The issue was caused by the drawing function for the colored collection icons not allowing to change the size of the icons. This patch addresses that by scaling the icon based on the drawing width. Reviewed By: #user_interface, natecraddock, Severin Differential Revision: https://developer.blender.org/D10708
2021-02-26Assets: Preview rendering for Action datablocksSybren A. Stüvel
Render previews for Action datablocks by rendering the scene camera with the Workbench (solid) engine. The //look// can be configured by setting the scene's render engine to Workbench and editing the scene's shading properties. It is assumed that the pose has already been applied and that the scene camera is capturing the pose. In other words, the render function just renders from the scene camera without evaluating/applying the Action stored in `preview->id`. The ID is only used to determine its type and to store the resulting preview. Not all code paths that lead to the `action_preview_render()` function actually provide a depsgraph. The "Refresh Asset Preview" button (`ED_OT_lib_id_generate_preview`) does, but `WM_OT_previews_ensure` does not. Reviewed By: Severin Differential Revision: https://developer.blender.org/D10543
2021-02-17Cleanup: Abbreviate enums with 'UNSIGNED_' in the nameGermano Cavalcante
2021-01-04Cleanup: use const variablesCampbell Barton
2021-01-02Cleanup: Explicitly pass icon size to generation function, not just boolJulian Eisel
* This way you don't have to look up the function declaration to know what the boolean value means. * You can call the function in a loop over the available sizes and pass the index as size. * Makes it easier to add a new size in future if needed.
2020-12-21UI: Use better icon for identifying assetsJulian Eisel
Use the `ASSET_MANAGER` icon which is more appropriate than the current one which was just an unused icon that seemed sorta fitting, but was only meant to be temporary. The `ASSET_MANAGER` icon is already used for the Asset Browser, so it's being reused which we normally avoid. So we may still want to create a dedicated one, maybe a variation of this one.
2020-12-16Fix possible crash with custom (add-on defined) iconsEric Cosky
This change is a simple null check on the ID provided to icon_set_image() which appears to be a legitimate value for the ID when used by some addins (discovered with PowerSave shortly after syncing to main). Differential Revision: https://developer.blender.org/D9866 Reviewed by: Julian Eisel
2020-12-16UI: Indicate asset data-blocks with an icon in Outliners & search menusJulian Eisel
It's useful to easily see which data-blocks are assets and which not. So just like we usually show the library linking/override icons, we show the asset icon there (these are mutually exclusive data-block states). Uses the `'MAT_SPHERE_SKY` icon, which wasn't used before (except by an add-on!) and is sorta fitting, but not quite. We should either change this one or add an own asset icon. Meanwhile this isn't too bad :) Also adds an internal macro to check if a data-block is an asset, consistent to how we do it for libraries and library overrides.
2020-12-15Asset System: Various changes to previews in preparation for Asset BrowserJulian Eisel
* Support defining (not necessarily rendering) icons in threads. Needed so the File Browser can expose file previews with an icon-id to scripts. ** For that, ported `icons.c` to C++, to be able to use scope based mutex locks (cleaner & safer code). Had to do some cleanups and minor refactoring for that. * Added support for ImBuf icons, as a decent way for icons to hold the file preview buffers. * Tag previews as "unfinished" while they render in a thread, for the File Browser to dynamically load previews as they get finished. * Better handle cases where threaded preview generation is requested, but the ID type doesn't support it (fallback to single threaded). This is for general sanity of the code (as in, safety and cleanness) * Enabled asset notifier for custom preview loading operator, was just disabled because `NC_ASSET` wasn't defined in master yet. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9719 Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-11-18Fix wrong grease pencil datablock icon in file browserNathan Craddock
The datablock shown in the file browser was the draw mode icon rather than the datablock icon.
2020-11-14UI: Remove remaining uses of old collection iconNathan Craddock
After rB452a1c7b3838 there were still a few cases where the old collection icon was used in the interface. Replace these with the new filled collection icon.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-21Cleanup: Reduce indentation by returning earlyHans Goudey
Checking for NULL icons or draw info can remove some indentation later in the funcitons, making the code more readable.
2020-09-21Cleanup: Declare variables where initializedHans Goudey
2020-09-18Cleanup: change enum usage so types are explicitly listedCampbell Barton
Structure switch statements so new missing items cause warnings.
2020-09-18Cleanup: use 'UI_icon_*' prefix for icons APICampbell Barton
- UI_collection_color_icon_get -> UI_icon_color_from_collection - UI_idcode_icon_get -> UI_icon_from_idcode - UI_library_icon_get -> UI_icon_from_library - UI_mode_icon_get -> UI_icon_from_object_mode - UI_rnaptr_icon_get -> UI_icon_from_rnaptr - UI_alert_image -> UI_icon_alert_imbuf_get - UI_preview_render_size -> UI_icon_preview_to_render_size - UI_id_icon_render -> UI_icon_render_id
2020-09-15UI: Show color tagged collection icons in menusNathan Craddock
Draw color tagged collection icons in the link to collection, add collection instance, collection instance search, and remove collection menus. Manifest Task: https://developer.blender.org/T77777 Differential Revision: https://developer.blender.org/D8622
2020-09-15Collections: Add color taggingNathan Craddock
This adds color tagging to collections. There are 8 color options which are themable in the user preferences, with an additional option for no color tag by default. This adds a new filled collection icon and 8 colored variants of the icon that can be themed in the user preferences. In this commit the only interface to setting the color tags is through Python, and there is nowhere in the interface where the collections are shown colored. Setting and viewing the color tags from the outliner will follow. Manifest Task: https://developer.blender.org/T77777 Differential Revision: https://developer.blender.org/D8622
2020-09-12Fix remaining GL calls/type preventing from building due to recent cleanupClément Foucault
2020-09-10Outliner: Move mode toggling to left columnNathan Craddock
Add a column of icons in the left gutter of the outliner for controlling the interaction modes of objects. When an object is in a mode other than object mode, the mode icon will draw to the left of that object. Any other objects that are valid to be added or swapped into the mode are drawn with a dot to the left of the object. Clicking the dot to the left of an object will swap that object with the current active object in the interaction mode. For edit and pose modes, ctrl clicking the dot will add that object to the current mode. Clicking the mode icon next to the active object removes it and all other objects from the current mode. The behavior is nearly identical to the previous edit/pose mode toggling by selecting the mesh and armature datablocks, with additional support for all interaction modes. Currently two undo steps are pushed to prevent an assert. Part of T77408 Manifest Task: https://developer.blender.org/T68498 Differential Revision: https://developer.blender.org/D8641
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-05GPUTexture: Change texture creation APIClément Foucault
This is to modernize the API: - Add meaningful name to all textures (except DRW textures). - Remove unused err_out argument: only used for offscreen python. - Add mipmap count to creation functions for future changes. - Clarify the data usage in creation functions. This is a cleanup commit, there is no functional change. # Conflicts: # source/blender/gpu/GPU_texture.h
2020-09-05Cleanup: GPUTexture: Remove use of GPU_texture_create_nDClément Foucault
Use creation + update function instead.
2020-09-05GPUTexture: Add support for samplersClément Foucault
This just add back the support. This commit also includes a bit of cleanup. # Conflicts: # source/blender/gpu/GPU_texture.h
2020-09-04Cleanup: Clang-Tidy readability-redundant-preprocessor fixesSybren A. Stüvel
Remove redundantly nested `#if` and `#ifdef` statements. One nested `#if 0` block was left untouched, as it's in particle code that's no longer maintained. Furthermore, that block also has some explanation as to the differences between the enabled & disabled parts. One nested `#if 0` construct was completely removed, leaving only the actually used bit of code. There was no explanation as to the usefulness of the disabled code, and it hasn't been touched in years. No functional changes.
2020-09-01Cleanup: Use GPUBatch for icon and area drawingClément Foucault
This is in order to remove GPU_draw_primitive to streamline the drawing abstraction.
2020-08-26Cleanup: use const variables in interface codeCampbell Barton
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Cleanup: GPUState: remove use of GPU_blend_set_funcClément Foucault
2020-08-18Cleanup: GPUState: Replace blend func separate by enumClément Foucault
2020-07-26GPU: Remove GL constant from BIF_glutilClément Foucault
2020-07-20Fix T79089: Crash changing themesCampbell Barton
Regression from 2840782d8478f.
2020-07-18Cleanup: GPU: Make icon drawing use GPUTextureClément Foucault
This remove all gl function calls. Adds a new sampler only for icon drawing.
2020-07-03Cleanup: Interface, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/interface` module. No functional changes.
2020-06-29UI: Show library status icons in search menus, rather than letter prefixJulian Eisel
Rather than a `L` (linked), `O` (overridden) or `M` (missing) prefix for the name, show the existing library status icons. See D7999 for screenshots. Note that when using preview icons, or if the search menu contains items with own icons (e.g. brush icons), we still fallback to the prefix solution. Zero or fake user is still indicated with a prefix. Differential Revision: https://developer.blender.org/D7999 Reviewed by: Bastien Montagne, William Reynish
2020-06-02Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensureClément Foucault
2020-06-02GPU: ShaderInterface: Refactor to setup all uniform at creation timeClément Foucault
This remove the complexity of queriying the locations at runtime and allows for more performance and upfront binding specifications. The benefit of doing everything at creation time is that we can assign binding points in a predictable order which is going to be somewhat the same for every similar shader. This also rewrite GPU_vertformat_from_shader to not use shaderface. This is to keep the shaderface simple. If it becomes necessary to not query the shader after creation (i.e: vulkan?) we could just create the vert format in advance at compilation for PyGPU shaders. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7879
2020-05-12Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-12Cleanup: remove DNA_screen_types.h, use struct qualifierCampbell Barton
Also remove draw-manager & depsgraph headers in interface_icons.c Change this in 2.83 to prevent merge issues in master with interface_intern.h header.
2020-04-22Merge branch 'blender-v2.83-release'Bastien Montagne
2020-04-21Fix T75909: icons memory leak in headless buildBrecht Van Lommel
2020-04-20Simulations: Add new simulation data blockJacques Lucke
This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-04-03Cleanup: use abbreviated names for unsigned types in editorsCampbell Barton