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
2018-07-02Fix: Global area edges couldn't call right click menu to join/splitJulian Eisel
Operators ignored edges along the screen-layout bounds. They should've ignored those along window bounds instead. Although the global areas can not be joined/split, the adjacent areas can. So the menu should still be shown. Had to change the return value of area joining operator, so that an error report can show up when trying to join over a global area edge. Think this is fine to do, but you never know with such stuff. Preferably we'd gray out the "Join Area" item in the menu when clicking on the edge of a global area. Unfotunately the operator uses coordinates passed as operator properties to find the right edge/areas, which we cannot access from the poll callback.
2018-06-28UI: keep some operator text in headers.Brecht Van Lommel
Key shortcuts and explanation about how to use the tool should go to the status bar, but other info can in the header so it's near where the user is working. This distinction has not been made yet for all operators.
2018-06-26UI: move modal operator text from headers to status bar.Brecht Van Lommel
Python API is context.workspace.status_text_set()
2018-06-23UI: Add user defined context menuCampbell Barton
- Add/Remove from RMB context menu. - Stored in user preferences. - Access from Q key. See T55027.
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-06-15WM: 2.8 screen compatibilityCampbell Barton
Without these minor changes loading files from 2.8 will crash. Manually applied edits from 26786a2b87a08
2018-06-14WM: add support for temporary region dataCampbell Barton
2018-06-12Merge branch 'master' into blender2.8Campbell Barton
2018-06-12WM: remove sloppy region type accessCampbell Barton
Avoid accidentally operating on the wrong region type.
2018-06-12WM: rename BKE_regiontype_from_idCampbell Barton
This returns the first as a fallback, causing confusing usage. Renamed and added a version of the function that doesn't.
2018-06-03UI: add subpanel support.Brecht Van Lommel
In the Python API, any panel becomes a subpanel by setting bl_parent_id to the name of the parent panel. These subpanels can contain advanced or less commonly used settings.
2018-04-27WM: new offscreen window draw method to replace all existing methods.Brecht Van Lommel
For Blender 2.8 we had to be compatible with very old OpenGL versions, and triple buffer was designed to work without offscreen rendering, by copying the the backbuffer to a texture right before swapping. This way we could avoid redrawing unchanged regions by copying them from this texture on the next redraws. Triple buffer used to suffer from poor performance and driver bugs on specific cards, so alternative draw methods remained available. Now that we require newer OpenGL, we can have just a single draw method that draw each region into an offscreen buffer, and then draws those to the screen. This has some advantages: * Poor 3D view performance when using Region Overlap should be solved now, since we can also cache overlapping regions in offscreen buffers. * Page flip, anaglyph and interlace stereo drawing can be a little faster by avoiding a copy to an intermediate texture. * The new 3D view drawing already writes to an offscreen buffer, which we can draw from directly instead of duplicating it to another buffer. * Eventually we will be able to remove depth and stencil buffers from the window and save memory, though at the moment there are still some tools using it so it's not possible yet. * This also fixes a bug with Eevee sampling not progressing with stereo drawing in the 3D viewport. Differential Revision: https://developer.blender.org/D3061
2018-04-20UI: New Global Top-Bar (WIP)Julian Eisel
== Main Features/Changes for Users * Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars. * Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector. * Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here. * Individual sections of the topbar are individually scrollable. * Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting. * Top-bar should scale nicely with DPI. * The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes). * Info editors at the top of the window and using the full window width with be replaced by the top-bar. * In fullscreen modes, no more info editor is added on top, the top-bar replaces it. == Technical Features/Changes * Adds initial support for global areas A global area is part of the window, not part of the regular screen-layout. I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas. * Adds a TOPBAR editor type The editor type is hidden in the UI editor type menu. * Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY) * Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar. * Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds. The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved. * Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code. Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being. NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility. == ToDo's It's a bit hard to predict all the ToDo's here are the known main ones: * Add options for the new active-tool system and for operator redo to the topbar. * Automatically hide the top-bar in fullscreen modes. * General visual polish. * Top-bar drag & drop support (WIP in temp-tab_drag_drop). * Improve dynamic regions (should also fix some layout glitches). * Make internal terminology consistent. * Enable topbar file writing once design is more advanced. * Address TODO's and XXX's in code :) Thanks @brecht for the review! And @sergey for the complaining ;) Differential Revision: D2758
2018-04-18Move transform orientation to sceneCampbell Barton
This was stored in the workspace, selected from the view. Move both to scene since custom orientations are closely related to your scene data.
2018-04-16Cleanup: move some screen utility functions, from topbar branch.Julian Eisel
2018-03-23Cleanup: stray tabsCampbell Barton
Tabs in middle of code (mostly for no reason / by accident).
2018-03-22GPUCompositing: Remove entire module.Clément Foucault
This module has no use now with the new DrawManager and DrawEngines and it is using deprecated paths. Moving gpu_shader_fullscreen_vert.glsl to draw/modes/shaders/common_fullscreen_vert.glsl
2018-02-17Code cleanup: remove WM subwindows.Brecht Van Lommel
These no longer made much sense after regions were added, they just duplicated state that was already in the regions.
2018-01-25Merge branch 'master' into blender2.8Campbell Barton
2018-01-25UI: change tool-tips to be stored in the screenCampbell Barton
Move timer and tip out of button code, now the only requests a tooltip, passing a creation callback to run. Needed for manipulators in 2.8, also helps de-duplicate logic - since we never want multiple tool-tips showing at once.
2017-08-08Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/depsgraph/intern/builder/deg_builder_relations.cc source/blender/editors/object/object_add.c source/blender/python/intern/bpy_app_handlers.c
2017-08-08Fix T52263: Crash When Splitting and Merging Areas with Header Text Set.Bastien Montagne
Not a regression, but safe enough to be included in 2.79.
2017-07-31Fix glitch updating manipulator after undoCampbell Barton
Running undo would notify manipulators to refresh, but this still allowed for events in the queue to be handled, where manipulators could be drawn for selection before their refresh callback runs. This made Python manipulators raise exceptions about referencing invalid data (or crash). Now tag manipulator update on file load (including undo) and ensure the refresh callback runs before drawing manipulator selection. Also split manipulator map refresh flag in two since selection doesn't perform the same operations as regular drawing.
2017-07-31Cleanup: remove next/prev from manipulator mapCampbell Barton
2017-06-13Woarkspace: Remove residue of hidden typeSergey Sharybin
There is no reason to be special for workspace and go against other design decision in Blender. If something like this is going to become a common practice in Blender it should be well thought and well tested, including tests of all supported compilers and configurations. This feature was relying on type re-definition, which is not only confusing but also available in C11 only.
2017-06-01Move custom transform orientations to workspaceJulian Eisel
This commit moves the list of transform orientations from scenes to workspaces. Main reasons for this are: * Transform orientations are UI data and should not be stored in the scene. * Introducion of workspaces caused some (expected) glitches with transform orientations. Mainly when removing one. * Improves code. More technically speaking, this commit does: * Move list of custom transform orientations from Scene to WorkSpace struct. * Store active transform orientation index separate from View3D.twmode (twmode can only be set to preprocessor defined values now). * Display custom transform orientation name in header when transforming in it (used to show "global" which isn't really correct).
2017-06-01Main Workspace IntegrationJulian Eisel
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup) Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know! (Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.) == Main Changes/Features * Introduces the new Workspaces as data-blocks. * Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces. * Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces). * Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead. * Store screen-layouts (`bScreen`) per workspace. * Store an active screen-layout per workspace. Changing the workspace will enable this layout. * Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.) * Store an active render layer per workspace. * Moved mode switch from 3D View header to Info Editor header. * Store active scene in window (not directly workspace related, but overlaps quite a bit). * Removed 'Use Global Scene' User Preference option. * Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well. * Default .blend only contains one workspace ("General"). * Support appending workspaces. Opening files without UI and commandline rendering should work fine. Note that the UI is temporary! We plan to introduce a new global topbar that contains the workspace options and tabs for switching workspaces. == Technical Notes * Workspaces are data-blocks. * Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now. * A workspace can be active in multiple windows at the same time. * The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned). * The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that). * Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs. * `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those. * Added scene operators `SCENE_OT_`. Was previously done through screen operators. == BPY API Changes * Removed `Screen.scene`, added `Window.scene` * Removed `UserPreferencesView.use_global_scene` * Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces` * Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer` * Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name) == What's left? * There are a few open design questions (T50521). We should find the needed answers and implement them. * Allow adding and removing individual workspaces from workspace configuration (needs UI design). * Get the override system ready and support overrides per workspace. * Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc). * Allow enabling add-ons per workspace. * Support custom workspace keymaps. * Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later. * Get the topbar done. * Workspaces need a proper icon, current one is just a placeholder :) Reviewed By: campbellbarton, mont29 Tags: #user_interface, #bf_blender_2.8 Maniphest Tasks: T50521 Differential Revision: https://developer.blender.org/D2451
2016-12-01UI: Previews for screen layoutsJulian Eisel
Basically all this does is drawing layout previews into the opened layout search menu. https://youtu.be/RHYWtZP7pyA The previews are drawn using offscreen rendering so they can't use multi-threading (yet!). But that shouldn't be an issue since only a handful of previews are drawn at the same time. Normally we only need to redraw the preview if a screen layout was changed. Would be nice if PreviewImage could store if it supports threaded rendering. Previews are saved in files, might be useful if you later want to support appending layouts. Adds a new file screen_draw.c.
2016-10-07Custom Manipulators Core BackendJulian Eisel
This commit lands the core backend of the Custom Manipulators project onto the blender2.8 branch. It is a generic backend for managinig interactive on-screen controls that can be integrated into any 2D or 3D edito. It's also already integrated into the window-manager and editor code where needed. NOTE: The changes here should not be visible for users at all. It's really just a back-end patch. Neither does this include any RNA or Python integration. Of course, there's still lots of work ahead for custom manipulators, but this is a big milestone. WIP code that actually uses this backend can be found in the 'custom-manipulators' branch (previously called 'wiggly-widgets'). The work here isn't completely my own, all the initial work was done by @Antony Riakiotakis (psy-fi) and - although it has changed a lot since them - it's still the same in essence. He definitely deserves a big credit! Some changes in this patch were also done by @Campbell Barton (campbellbarton). Thank you guys! Merge accepted by @brecht and @merwin. Patch: https://developer.blender.org/D2232 Code documentation: https://wiki.blender.org/index.php/Dev:2.8/Source/Custom_Manipulator Main task: https://developer.blender.org/T47343 More info: https://code.blender.org/2015/09/the-custom-manipulator-project-widget-project/
2016-06-22ID-Remap - Step one: core work (cleanup and rework of generic ID datablock ↵Bastien Montagne
handling). This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock was pretty much impossible, except for a few special cases. Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite a few ID usages were missed or wrongly handled that way). One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling by using library_query utils to allow generic handling of those, which is now the case (now, generic ID links handling is only "knwon" from readfile.c and library_query.c). This commit also adds backends to allow live replacement and deletion of datablocks in Blender (so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one, or NULL one in case of unlinking). This will allow nice new features, like ability to easily reload or relocate libraries, real immediate deletion of datablocks in blender, replacement of one datablock by another, etc. Some of those are for next commits. A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core. Though it was tested rather deeply, being totally impossible to check all possible ID usage cases, it's likely there are some remaining issues and bugs in new code... Please report them! ;) Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2015-11-17Clear timer on region duplicate, avoid double freeCampbell Barton
2015-09-19Fix leak in UI PanelsCampbell Barton
Switching screens quickly didn't free the panels activedata.
2015-05-13UI: check visible layers when reading contextCampbell Barton
This resolves a problem where selected items edited for multi-value-editig could include objects not in any visible views (unlocked layers, local view... etc).
2015-05-04Fix T44376: Buttons context, invalid data accessCampbell Barton
Removing a scene from the buttons window would crash from a Python operator.
2015-04-27Fix T44011: Ruler/Knife/Loop-cut fail in quad-viewCampbell Barton
This is a kind of sloppy-focus, resolving long standing bug with loop-cut/knife/ruler /w quad-view. Where activating a tool would lock onto one of quad-views, especially problematic when activating from the toolbar or menus.
2015-03-20Cleanup: warnings bit-shift int overflowCampbell Barton
2015-02-12Viewport compositing - first codeAntony Riakiotakis
This commit introduces a few ready made effects for the 3D viewport and OpenGL rendering. Included effects are Depth of Field, accessible from camera view and screen space ambient occlusion. Those effects can be turned on and tweaked from the shading panel in the 3D viewport. Off screen rendering will use the settings of the current camera. WIP documentation can be found here: http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing
2015-01-21BKE_screen: add BKE_screen_find_area_xyCampbell Barton
Use from eyedropper & screen operators also define SPACE_TYPE_ANY for readability.
2015-01-07PyAPI: Call to get the pixel x,y in a text blockMartin Felke
This allows scripts to request the screen location of any (line, column) pair.
2014-09-02Fixes localview and view-local layersCampbell Barton
- Drawing grease pencil fail without scene-lock. - Converting to curve failed without scene-lock. - Outliner drag into viewport failed with local-view.
2014-04-23Fix T39847: uiPreview not being copied with areasCampbell Barton
2014-04-02Add drag-resize to uiTemplatePreview (mat/tex/etc. preview widget).Bastien Montagne
This is done by adding a new button type, GRIP, similar to other numbuttons (scroll, slider, ...), which here controls the preview height. Then, we add a new DNA struct to be able to save that height in Blend files (note I choose not to use Panel struct for this, because we would then have the same limitation we used to have with uiLists, only one preview per panel and no preview outside panel). This implies a change to template_preview UI RNA/py API (each preview needs an ID), but this is backward compatible, as by default datablock type will be used if no ID is given (which means e.g. all material previews with no ID will have same height). Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D342
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-07ListBase API: add utility api funcs for clearing and checking emptyCampbell Barton
2013-12-16UI: Tabs categories for panels (D75)Campbell Barton
- works by defining panel categories, currently restricted to the toolbar. - no panels define bl_categories yet, so no user visible changes since tabs only show when there are multiple. - panel pinning is available in rmb menu or alt+lmb.
2013-11-25Transform: old todo, removing an orientation now checks all screens.Campbell Barton
also fix for using uninitialized matrix when an out-of-range index is set for custom orientations.
2013-09-29Fix [#36830] 'Reset to Default Value' on Current Area Type button causes crashBastien Montagne
Default default value for space types (0, i.e. SPACE_EMPTY) is not valid, use SPACE_VIEW3D instead.
2013-08-29Last uiList patch (for now!): filtering and reordering of shown elements.Bastien Montagne
Thanks to Brecht for the reviews. :) This commit adds a show/hide extension below each uiList, containing by default an option to filter and/or reorder items by name (and to reverse those filtering and reordering). Each derived uiList class in Python can define more specific filtering by implementing callbacks: the draw_filter() function to draw options in UI, and the filter_items() function to effectively filter/reorder items. Note: the advanced options for vgroups shown as "proof od concept" in patches do not go in trunk for now, we have to find a better way to get those vgroups info for UI code, we can't afford to loop over each vertex here! And doc (release notes and uiList example) is still to be updated, will do this in next days.
2013-08-27uiLists enhacements: dragresize and better GRID layout.Bastien Montagne
Many thanks to Brecht for the review! * You can now drag-resize uiLists (in default or grid layouts). ** Note about "default" size: when you drag below minimal size of the uiList, it will automatically reset to automatic sizing (i.e. size between rows and maxrows, depending on the number of items to show). This often means (e.g. in Materials list with many mat slots) that the list will grow again to maxrows! * Grid uiLists now have a customizable number of columns (previously it was a fixed value of 9), and they will respect the rows/maxrows settings as well (i.e. show a scrollbar when needed), instead of growing indefinitly!