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-02-09Cleanup: move eIconSizes, ID_Type enums into own fileCampbell Barton
This avoids adding DNA_ID.h into other headers, recently changed in cfa48c84d06ca8197f86b6d3ceef8a2c7c311a82 Note that other enums could be moved too, this is a smaller change to avoid indirectly including DNA_ID.h in many places.
2021-02-09Cleanup: Register node property layout callbacks in filesHans Goudey
This commit moves the property layout callbacks for node types to their implementation files from `drawnode.c`. This was proposed a while ago in T75724. **Benefits** - Fewer files need to be changed when adding a new node. - Makes it possible to reuse functions from the node's implementation in the layout code. - Except for RNA, all of the node "inputs" are in the same place. - Code gets shorter overall, avoids the large switch statements. **Downsides** - Requires including two UI headers. - Requires adding an editors dependency to the nodes folder. This commit only changes function nodes and geometry nodes, more can be moved later. Differential Revision: https://developer.blender.org/D10352
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-09-30Cleanup: sort struct declarationsCampbell Barton
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-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-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-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
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-03-14UI: Larger Alert IconsHarley Acheson
Adding a set of larger icons for use in informational dialogs. Differential Revision: https://developer.blender.org/D6859 Reviewed by Campbell Barton
2020-03-02Cleanup: make remaining editor include headers work in C++Jacques Lucke
2020-02-20Cleanup: declatatuons for functions that don't existCampbell Barton
2019-08-05Cleanup: use unsigned char for theme colorsCampbell Barton
Nearly all byte-color functions use 'uchar' causing casts when then colors were passed in. Declare as uchar to remove the need for casts.
2019-05-09UI: dim icons in inactive tabs, similar to textBrecht Van Lommel
This makes the properties editor navigation bar less saturated. Internally the icon theme coloring was refactored a bit to move more towards the button drawing code.
2019-05-09Cleanup: reduce number of UI_icon_draw variationsBrecht Van Lommel
2019-05-09Themes: add setting to draw border around icons, use for Blender LightJeroen Bakker
Monochrome colored icons don't work well on a dark background, so now we can add a border around them. Note that most icons in the interface will remain without a border, just the outliner and properties editor navigation have colored icons and those will get a border. Other icons continue to be drawn in the text colored without a border. Differential Revision: https://developer.blender.org/D4787
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-09-27UI: draw mono icons with button type text color, instead of area text color.Brecht Van Lommel
2018-07-24Fix T56079: crash with startup.blend saved in sculpt/paint modes.Brecht Van Lommel
This reverts commit 81a93df6d22c2f148667b9a6e8308e083a4cec39, it is not safe to handle initialization for startup.blend differently. Instead fix the root issue of the preview icon data structures not being initialized in time.
2018-06-10UI: change toolbar icon size from 38 -> 32Campbell Barton
2018-06-01Merge branch 'master' into blender2.8Campbell Barton
2018-06-01Cleanup: trailing whitespace (comment blocks)Campbell Barton
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-04-28UI: Add icon color saturation preferenceCampbell Barton
Toolbar icon saturation can now be set from the preferences, (use 0.4 by default).
2018-04-26UI: desaturate toolbar icons that the mouse is not over.Brecht Van Lommel
This does not look great with light toolbar buttons as in the default, so consider this a work in progress.
2018-04-25UI: workaround for text & icon alignmentCampbell Barton
Blender's icons weren't written to draw different sizes. For now ifdef in a hack to show toolbar icons larger.
2018-03-31UI: Perf: Batch icons drawcalls together.Clément Foucault
For this we use a new shader that gets it's data from a uniform array. Vertex shader position the vertices using these data. Using glUniform is way faster than using imm for that matter. Like BLF rendering, UI icons are always (as far as I know) non occluded and displayed above everything else. They also does not overlap with texts so they can be batched at the same time.
2017-02-22UI: Support drag & drop reordering of collectionsJulian Eisel
This adds initial support for reordering collections from the Outliner using drag & drop. Although drag & drop support is limited to collections for now, this lays most foundations for general drag & drop reordering support in the Outliner. There are some design questions to be answered though: * Would reordering of other data types (like objects) be a purely visual change or would it affect the order in which they are stored? (Would that make a difference for the user?) * Should/can we allow mixing of different data types? (e.g. mixing render layers with objects) * How could we realize this technically? Notes: * "Sort Alphabetically" has to be disabled to use this ("View" menu). * Reordering only works with collections on the same hierarchy level. * Added some visual feedback that should work quite well, it's by far not a final design though: {F493806} * Modified collection orders are stored in .blends. * Reordering can be undone. * Did minor cleanups here and there.
2017-02-15Revert "Collection Editor based on patch by Julian Eisel"Dalai Felinto
This reverts commit 3da834e83ce9d7056c033148dab04885a6d3b1b7. We will use the outliner for this now. I'm also moving the collections_ops.c to outliner_collections.c
2017-02-07Render Layers and Collections (merge from render-layers)Dalai Felinto
Design Documents ---------------- * https://wiki.blender.org/index.php/Dev:2.8/Source/Layers * https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised User Commit Log --------------- * New Layer and Collection system to replace render layers and viewport layers. * A layer is a set of collections of objects (and their drawing options) required for specific tasks. * A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers. * All Scenes have a master collection that all other collections are children of. * New collection "context" tab (in Properties Editor) * New temporary viewport "collections" panel to control per-collection visibility Missing User Features --------------------- * Collection "Filter" Option to add objects based on their names * Collection Manager operators The existing buttons are placeholders * Collection Manager drawing The editor main region is empty * Collection Override * Per-Collection engine settings This will come as a separate commit, as part of the clay-engine branch Dev Commit Log -------------- * New DNA file (DNA_layer_types.h) with the new structs We are replacing Base by a new extended Base while keeping it backward compatible with some legacy settings (i.e., lay, flag_legacy). Renamed all Base to BaseLegacy to make it clear the areas of code that still need to be converted Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp * Unittesting for main syncronization requirements - read, write, add/copy/remove objects, copy scene, collection link/unlinking, context) * New Editor: Collection Manager Based on patch by Julian Eisel This is extracted from the layer-manager branch. With the following changes: - Renamed references of layer manager to collections manager - I doesn't include the editors/space_collections/ draw and util files - The drawing code itself will be implemented separately by Julian * Base / Object: A little note about them. Original Blender code would try to keep them in sync through the code, juggling flags back and forth. This will now be handled by Depsgraph, keeping Object and Bases more separated throughout the non-rendering code. Scene.base is being cleared in doversion, and the old viewport drawing code was poorly converted to use the new bases while the new viewport code doesn't get merged and replace the old one. Python API Changes ------------------ ``` - scene.layers + # no longer exists - scene.objects + scene.scene_layers.active.objects - scene.objects.active + scene.render_layers.active.objects.active - bpy.context.scene.objects.link() + bpy.context.scene_collection.objects.link() - bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None) + bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None) - bpy.context.object.select + bpy.context.object.select = True + bpy.context.object.select = False + bpy.context.object.select_get() + bpy.context.object.select_set(action='SELECT') + bpy.context.object.select_set(action='DESELECT') -AddObjectHelper.layers + # no longer exists ```
2015-08-10Data previews: add utils to generate/clear previews.Bastien Montagne
Not much to add, you can now clear previews from current .blend file, or a set of non-opened files. Likewise, you can generate previews (for mat/tex, objects, groups, scenes, ...).
2015-05-25Fix `widget_draw_preview()` not taking into account given alpha.Bastien Montagne
Needed to get correct 'inactive' effect on buttons with big previews.
2015-05-11Expose PreviewImage & custom icons to py API.Bastien Montagne
This commit mainly: * Exposes PreviewImage struct in RNA, including ways for user to set images data. * Adds a new kind of PreviewImage, using a file path and IMB_thumb to get image. * Adds a new kind of custom icon using PreviewImage, unrelated to ID previews system. * Adds a python API (utils.previews) to allow python scripts to access those custom previews/icons. Note that loading image from files' thumbnails is done when needed (deferred loading), not when defining the custom preview/icon. WARNING: for release addons who would want to use this, please keep it to a strict minimum, really needed level. We do not want our UI to explode under hundreds of different flashy icons! For more info, see also the release notes of Blender 2.75 (http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.75/Addons) and the example/templates featured with Blender. Patch by Campbell (ideasman42), Inês (brita) and Bastien (mont29). Differential Revision: https://developer.blender.org/D1255
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-01-12Second try to fix missing previews of mat/tex/etc. in .blend files.Bastien Montagne
This time, it's a dedicated operator user has to run before saving the file. And it recursively check all IDs linked from each scene, therefore rendering materials etc. previews using a scene they are used in. Note the renderengine issue is not completely addressed this way (existing code for icon previews seems to ignore completely other engines, and IDs not linked anywhere (fake-user ones) will be rendered with current scene's engine as fallback, also you can get a material linked to an hidden object in a scene, etc.). Reviewers: sergey, campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D980
2015-01-07Ensure mat/tex/etc. previews are generated/saved in .blend files when ↵Bastien Montagne
enabled in userprefs. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D970
2013-04-04code cleanup: use bools in UI and WM code, quiet some shadow warnings, ↵Campbell Barton
remove unused function uiEmboss()
2013-01-22Matcap support in 3D Viewport.Ton Roosendaal
Full log is here: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability#Matcap_in_3D_viewport Implementation notes: - Matcaps are an extension of Solid draw mode, and don't show in other drawmodes. (It's mostly intended to aid modeling/sculpt) - By design, Matcaps are a UI feature, and only stored locally for the UI itself, and won't affect rendering or materials. - Currently a set of 16 (GPL licensed) Matcaps have been compiled into Blender. It doesn't take memory or cpu time, until you use it. - Brush Icons and Matcaps use same code now, and only get generated/allocated on actually using it (instead of on startup). - The current set might get new or different images still, based on user feedback. - Matcap images are 512x512 pixels, so each image takes 1 Mb memory. Unused matcaps get freed immediately. The Matcap icon previews (128x128 pixels) stay in memory. - Loading own matcap image files will be added later. That needs design and code work to get it stable and memory-friendly. - The GLSL code uses the ID PreviewImage for matcaps. I tested it using the existing Material previews, which has its limits... especially for textured previews the normal-mapped matcap won't look good.
2012-12-28This commit frees list ui items from their dependencies to Panel, and hence ↵Bastien Montagne
from all the limitations this implied (mostly, the "only one list per panel" one). It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels! This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore! To make all this work, other changes were also necessary: * Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox. * DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not. * UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon. * UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews). Note: not sure whether we should add that one to all UILayout's prop funcs? Note: will update addons using template list asap.
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-04-04use 'const float' when passing readonly colors, and include array size.Campbell Barton
2012-03-03style cleanup - use aligned * prefixed blocks for descriptive comments (was ↵Campbell Barton
already used a lot and part of proposed style guide).
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-01-21change filepath limit from 240 to 1024Campbell Barton
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-09-25Fix some MSVC 2010 warnings (including one apparent bug in ↵Andrew Wiggin
intern/elbeem/intern/solver_relax.h)
2011-06-05file selector now scales with DPI betterCampbell Barton