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-15UI: Implement icons for the curve sculpt tools brushesDalai Felinto
I'm using the tool icons for the brush themselves. Note: This includes a few brushes that are only defined in D15134. Those are simply the icons rendered with a world background of #282828.
2022-06-15UI: Fix sculpt curve not being able to get brush iconsDalai Felinto
This commit doesn't add the brush icons themselves, but it fix the code that allow them to be used.
2022-04-13Fix some usages of 'GPU_shader_get_uniform_block'Germano Cavalcante
`GPU_shader_get_uniform_block` is marked as deprecated and the value returned does not match what `GPU_uniformbuf_bind` expects. Also, small typo fix in python error message. Differential Revision: https://developer.blender.org/D14638
2022-03-29LibOverride: Add a new 'virtual' non-editable override icon and use it in ↵Bastien Montagne
Outliner. Ref: {T95707}.
2022-03-29Icons: Programmatically create indirect library icon, remove from SVGJulian Eisel
The indirect library data icon was just a grayed out version of the regular one. This graying out is now done in code, so the icon can be removed from the SVG. Note that the icon is still defined as `ICON_LIBRARY_DATA_INDIRECT` (or `LIBRARY_DATA_INDIRECT` in BPY).
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-02Event System: remove tweak events in favor of click-dragCampbell Barton
Supporting two kinds of dragging is redundant, remove tweak events as they only supported 3 mouse buttons and added complexity from using the 'value' to store directions. Support only click-drag events (KM_CLICK_DRAG) which can be used with any keyboard or mouse button. Details: - A "direction" member has been added to keymap items and events which can be used when the event value is set to KM_CLICK_DRAG. - Keymap items are version patched. - Loading older key-maps are also updated. - Currently the key-maps stored in ./release/scripts/presets/keyconfig/ still reference tweak events & need updating. For now they are updated on load. Note that in general this wont impact add-ons as modal operators don't receive tweak events. Reviewed By: brecht Ref D14214
2022-02-18UI: Speedup preview icon loading from hard driveJulian Eisel
Significantly improves loading speed of preview images from disk, e.g. custom previews loaded using `bpy.utils.previews.ImagePreviewCollection.load()`. See D14144 for details & comparison videos. Differential Revision: https://developer.blender.org/D14144 Reviewed by: Bastien Montagne
2022-02-18Cleanup: Rename original curve object type enumHans Goudey
This commit renames enums related the "Curve" object type and ID type to add `_LEGACY` to the end. The idea is to make our aspirations clearer in the code and to avoid ambiguities between `CURVE` and `CURVES`. Ref T95355 To summarize for the record, the plans are: - In the short/medium term, replace the `Curve` object data type with `Curves` - In the longer term (no immediate plans), use a proper data block for 3D text and surfaces. Differential Revision: https://developer.blender.org/D14114
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-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-02-07Curves: Rename "Hair" types, variables, and functions to "Curves"Hans Goudey
Based on discussions from T95355 and T94193, the plan is to use the name "Curves" to describe the data-block container for multiple curves. Eventually this will replace the existing "Curve" data-block. However, it will be a while before the curve data-block can be replaced so in order to distinguish the two curve types in the UI, "Hair Curves" will be used, but eventually changed back to "Curves". This patch renames "hair-related" files, functions, types, and variable names to this convention. A deep rename is preferred to keep code consistent and to avoid any "hair" terminology from leaking, since the new data-block is meant for all curve types, not just hair use cases. The downside of this naming is that the difference between "Curve" and "Curves" has become important. That was considered during design discussons and deemed acceptable, especially given the non-permanent nature of the somewhat common conflict. Some points of interest: - All DNA compatibility is lost, just like rBf59767ff9729. - I renamed `ID_HA` to `ID_CV` so there is no complete mismatch. - `hair_curves` is used where necessary to distinguish from the existing "curves" plural. - I didn't rename any of the cycles/rendering code function names, since that is also used by the old hair particle system. Differential Revision: https://developer.blender.org/D14007
2022-01-26Assets: allow creating preview image by rendering active objectJacques Lucke
For node groups there is no good default preview generation. Nevertheless, t would be useful to generate a preview image for a node group by rendering an object in some cases. This commit adds a new operator that allows updating the preview image for the active asset by rendering the active object. Note, the operator can also be used for other asset types, not just node groups. The operator can be found in a menu right below the refresh-preview button. Currently it is the only operator in that menu. In the future, more operators to create previews may be added. Differential Revision: https://developer.blender.org/D13747
2022-01-18GPU: Create Info for GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR.Jeroen Bakker
This patch converts GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR shader to use the GPUShaderCreateInfo pattern. It can be used as a reference when converting other shaders. In this special case the flat uniform vector cannot be used anymore as it doesn't fit as push constants. To solve this a uniform buffer is used.
2022-01-17Cleanup: Remove now redundant performance workaround for asset previewsJulian Eisel
Not needed anymore after aa0ecd179. The removed function was identical to `icon_draw_rect()` now. Reverts ab7214ca2ef9.
2022-01-17UI: Speed up icon scalingJulian Eisel
Use GPU-side scaling to speed up the scaling itself, and to avoid having to copy the image buffer using the CPU. Mipmapping is used to get decent filtering when downscaling without ugly artifacts. In my comparisons, there was barely any difference between the methods for DPIs >= 1. Below that, the result looks a bit different due to the different filtering method. See D13144 for screen-recordings showing the difference. Part of T92922. Differential Revision: https://developer.blender.org/D13144 Reviewed by: Jeroen Bakker
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-24Assets: Sanitize threaded preview creation with undoJulian Eisel
Basically, this fixes disappearing previews when editing asset metadata or performing undo/redo actions. The preview generation in a background job will eventually modify ID data, but the undo push was done prior to that. So obviously, an undo then would mean the preview is lost. This patch makes it so undo/redo will regenerate the preview, if the preview rendering was invoked but not finished in the undone/redone state. The preview flag PRV_UNFINISHED wasn't entirely what we needed. So I had to change it to a slightly different flag, with different semantics.
2021-11-22Assets: Generate light preview when making light object an assetJulian Eisel
We already supported previews for lights, just didn't actually use them when making a light object an asset. They were only used when making the light data itself an asset.
2021-11-22Fix grayed out preview generation button for light objectsJulian Eisel
Mistake in e7bea3fb6ed0. We should only skip preview generation for objects that don't support preview rendering, not completely forbid accessing preview data of such IDs.
2021-11-11Cleanup: spelling in commentsCampbell Barton
2021-11-08Fix performance issues with pose library sidebar and many posesJulian Eisel
When the asset view in the sidebar of the pose library would contain more than a few handful poses, interaction and animation playback performance would be impacted considerably. This was because our icon drawing scales image buffers using a rather slow method on the CPU. This commit changes it so the asset icons are scaled using the GPU. Note that this is a temporary change. I'd like all icon code to use GPU-side scaling, see D13144. But such a change is too risky to do in the release branch at this point, so this fix is specifically for the 3.0 release.
2021-11-08Cleanup: quiet compiler warningsCampbell Barton
2021-11-06Fix: Property editor icon jittering in some casesLeon Leno
In the tools tab, the tool icon would be offset when it intersected the bottom of the editor. With some screen resolutions, the icons on the left side of the editor would also move when intersecting the bottom of the editor. This happened because of the truncation in the implicit conversion from float to int. Instead, use explicit conversion functions. Differential Revision: https://developer.blender.org/D11097
2021-11-05UI: Use arrow icon on context pathsPablo Vazquez
The current `ICON_SMALL_TRI_RIGHT_VEC` uses dark hard-coded colors ([`0.2`, `0.2`, `0.2`]) which makes it impossible to theme and hard to see in dark contexts. Use `ICON_RIGHTARROW` to match the Outliner's breadcrumbs. This icon uses `TH_TEXT` so it's visible as long as the rest of the text is. ##### Master (Properties editor background made red on purpose to be able to see the triangle icon) {F11713038, size=full} #### This patch {F11713039, size=full} Reviewed By: #user_interface, Severin, HooglyBoogly Maniphest Tasks: T92771 Differential Revision: https://developer.blender.org/D13106
2021-09-29VSE: Add color tags to stripsFalk David
This patch adds color tags to VSE strips, an overlay option to toggle the colors on and off, a section in the theme settings to define the 9 possible colors and two ways of changing the color tag through the UI. You can change the color through the right-click context menu, or in the strip side panel next to the strip name. Color tags are defined in user preferences and they can be disabled in overlay settings. Reviewed By: campbellbarton, ISS Differential Revision: https://developer.blender.org/D12405
2021-09-23Cleanup: Remove hardcoded values and rename keyframe shape shadersDalai Felinto
No functional change. The shader is complicated by itself, having hardcoded values makes it even more cryptic. I also renamed the shader because the shader is not for the keyfarme diamond only, but for all the keyframe shapes. Differential Revision: https://developer.blender.org/D12615
2021-08-13Keyframe: Reduce GPU context switches.Jeroen Bakker
This change reduces the GPU context switches when drawing keyframes. In the previous situation the keyframe blocks and keyframe keys were drawn per channel. With this patch first all the keyframe blocks are drawn for all channels and after that the keyframe keys are collected for all channels and send to the GPU in a single draw call.
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-03UI: building without Python againCampbell Barton
Also quiet some warnings.
2021-07-26Cleanup: spelling in commentsCampbell Barton
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.