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
2020-10-03Cleanup: rename main preferences versioning functionCampbell Barton
BLO_version_defaults_userpref_blend -> blo_do_versions_userdef The name was misleading as it was declared along with BLO_update_defaults_startup_blend making it seem these functions were related. In fact preference defaults don't need to be updated as is done for startup.blend since an in-memory blend file isn't used. Rename the function to match other versioning functions called from readfile.c. Also add/update comments on these differences.
2020-10-02Fix userpref.blend using version from startup.blendCampbell Barton
Version patching userpref.blend wasn't using the correct version, causing settings not to be properly updated. This seems the likely cause of T70196 and similar bugs.
2020-09-08Cleanup: naming for library link enumCampbell Barton
Use 'e' prefix, update comments.
2020-09-08Refactor: move library linking arguments into a parameter structCampbell Barton
Move arguments to BLO_library_link_{begin/named_part/end} into a single parameter struct, to ensure arguments always match. This allows is to skip tagging ID's LIB_TAG_DOIT when it's not needed, previously it was always cleared just in case it was needed. This also makes it possible to remove BLO_library_link_named_part_ex which was only used when tagging was needed.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-18No experimental feature (but debug ones) to work for blender beta/releaseDalai Felinto
Final releases (including beta) should strictly show features that are finalized to prevent loss of data, old API clanging around, and the overall quality of the product (Blender) presented. Note that rendering should never be affected by user preferences, so this is only changing things in the UI level. Development note: This is reset experimental UI on file load. Also note: to hide RNA (needed for hair and particles) will be done as a separate patch. Differential Revision: https://developer.blender.org/D8606
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-23Cleanup: use doxy sections for BLI read/write headersCampbell Barton
Add reference between the read/write functions too.
2020-03-17Add experimental global undo speedup.Bastien Montagne
The feature is hidden behind an experimental option, you'll have to enable it in the preferences to try it. This feature is not yet considered fully stable, crashes may happen, as well as .blend file corruptions (very unlikely, but still possible). In a nutshell, the ideas behind this code are to: * Detect unchanged IDs across an undo step. * Reuse as much as possible existing IDs memory, even when its content did change. * Re-use existing depsgraphs instead of building new ones from scratch. * Store accumulated recalc flags, to avoid needless re-compute of things that did not change, when the ID itself is detected as modified. See T60695 and D6580 for more technical details.
2020-03-03IDs: change FILTER_ID_* to 64 bit to make space for new ID typesBrecht Van Lommel
And change file browser to boolean from bitflag enum, which is only 32 bit. Differential Revision: https://developer.blender.org/D7004
2020-02-20Cleanup: unused enumsCampbell Barton
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-07-31Cleanup: remove BLO_update_defaults_userpref_blendCampbell Barton
Merge into BKE_blendfile_userdef_from_defaults
2019-07-31Preferences: don't store preferences in the startupCampbell Barton
Simplify preferences by removing the ability to load them from either the startup.blend or userpref.blend. Also simplifies updating default preferences by moving them to a struct definition.
2019-06-13Fix T65445: wrong defaults when appending workspaces from builtin templatesBrecht Van Lommel
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-03-25Copy/Paste: refactor to be able to paste any kind of IDs, by type.Bastien Montagne
This commit does not add anything new from user perspective, but make it possible to paste any kind of IDs, not only objects/collections. Will be used by new copy/paste in the outliner in next commit.
2019-02-19Fix T61683: Linking the instance of a collection crashes Blender.Bastien Montagne
Do not instance linked object immediately in scene, this was never a good idea and is doomed to fail nowadays, with complex relations between objects, collections and scenes. Instead, this commit refactors a bit linking code to add loose objects to current scene *after* everything has been imported, and ID pointers have been properly remapped to new ones - i.e. once new linked data is supposed to be fully valid, just like we were already doing with collections. As a bonus, it means we do not have to pass around scene, view3d etc. to `BLO_library_link_named_part_ex()` and co.
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-08Fix (unreported) crash when undoing after ID deletion.Bastien Montagne
Yes, we do can undo an ID deletion now. However, this requires extra care in UI 'remapping' to new IDs step (when undoing, we do not fully reload the UI from saved .blend). Otherwise, new UI (i.e. one from saved .blend file) might reference IDs that where freed in old bmain (the one before the undo), we cannot use those to get ID name then, that would be a nasty use-after-free! To prevent this, we generate a GSet of all valid ID pointers at that time (i.e. those found in both old and new Main's), and ensure any ID we try to remap by its name is in that GSet. Otherwise, there is no possible remapping, just return NULL.
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
2019-01-15Cleanup: commas at the end of enumsCampbell Barton
Without this clang-format may wrap them onto a single line.
2018-12-30Cleanup: remove non-existing function declarationsCampbell Barton
2018-12-18Fix paste/append w/ local-viewCampbell Barton
Paste in local-view wasn't setting local-view bits.
2018-11-22Merge branch 'master' into blender2.8Campbell Barton
2018-11-22Fix T57989: File loaded as startupCampbell Barton
The file contents was used to check if the file was a startup file. Now pass in an argument from startup loading code instead.
2018-09-18Workspaces: move 2D Animation, VFX and Video workspaces into own templates.Brecht Van Lommel
These can now be acessed from the File > New, Ctrl+N, or the splash screen. Since these are application templates, users can save a separate startup.blend for each. User preferences are shared between these templates though. This also fixes some issues in the default startup.blend (triangulated cube..). Differential Revision: https://developer.blender.org/D3690
2018-09-12Cleanup: move preference versioning into own fileCampbell Barton
It's more convenient to keep version patching in the same place, this also splits out some function calls from version patching and supports updating UserDef structs besides the 'U'l global.
2018-08-20Workspaces: replace bundled workspace.blend with embedded startup.blend.Brecht Van Lommel
We want these to have the same workspaces in both, so there is no reason to have two files that are identical.
2018-08-08Cleanup: remove leftover game player code.Brecht Van Lommel
2018-06-27Theme: set default theme 'Flatty Dark Blueberry'Campbell Barton
The theme is now stored in generated C code, which can be extracted from existing user preferences. This theme can then be used for version patching themes instead of duplicating values Note that theme versioning has been removed, since minor changes from now on won't apply well on top of 2.7x theme. Theme colors from interface_widgets.c have been removed too.
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenloaderCampbell Barton
2018-05-18Collections and groups unificationBrecht Van Lommel
OVERVIEW * In 2.7 terminology, all layers and groups are now collection datablocks. * These collections are nestable, linkable, instanceable, overrideable, .. which opens up new ways to set up scenes and link + override data. * Viewport/render visibility and selectability are now a part of the collection and shared across all view layers and linkable. * View layers define which subset of the scene collection hierarchy is excluded for each. For many workflows one view layer can be used, these are more of an advanced feature now. OUTLINER * The outliner now has a "View Layer" display mode instead of "Collections", which can display the collections and/or objects in the view layer. * In this display mode, collections can be excluded with the right click menu. These will then be greyed out and their objects will be excluded. * To view collections not linked to any scene, the "Blender File" display mode can be used, with the new filtering option to just see Colleciton datablocks. * The outliner right click menus for collections and objects were reorganized. * Drag and drop still needs to be improved. Like before, dragging the icon or text gives different results, we'll unify this later. LINKING AND OVERRIDES * Collections can now be linked into the scene without creating an instance, with the link/append operator or from the collections view in the outliner. * Collections can get static overrides with the right click menu in the outliner, but this is rather unreliable and not clearly communicated at the moment. * We still need to improve the make override operator to turn collection instances into collections with overrides directly in the scene. PERFORMANCE * We tried to make performance not worse than before and improve it in some cases. The main thing that's still a bit slower is multiple scenes, we have to change the layer syncing to only updated affected scenes. * Collections keep a list of their parent collections for faster incremental updates in syncing and caching. * View layer bases are now in a object -> base hash to avoid quadratic time lookups internally and in API functions like visible_get(). VERSIONING * Compatibility with 2.7 files should be improved due to the new visibility controls. Of course users may not want to set up their scenes differently now to avoid having separate layers and groups. * Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero files. There's a few things which are know to be not quite compatible, like nested layer collections inside groups. * The versioning code for 2.8 files is quite complicated, and isolated behind #ifdef so it can be removed at the end of the release cycle. KNOWN ISSUES * The G-key group operators in the 3D viewport were left mostly as is, they need to be modified still to fit better. * Same for the groups panel in the object properties. This needs to be updated still, or perhaps replaced by something better. * Collections must all have a unique name. Less restrictive namespacing is to be done later, we'll have to see how important this is as all objects within the collections must also have a unique name anyway. * Full scene copy and delete scene are exactly doing the right thing yet. Differential Revision: https://developer.blender.org/D3383 https://code.blender.org/2018/05/collections-and-groups/
2018-04-01Merge branch 'master' into blender2.8Campbell Barton
- Undo that changes modes currently asserts, since undo is now screen data. Most likely we will change how object mode and workspaces work since it's not practical/maintainable at the moment. - Removed view_layer from particle settings (wasn't needed and complicated undo).
2018-03-31Undo: unified undo system w/ linear historyCampbell Barton
- Use a single undo history for all operations. - UndoType's are registered and poll the context to check if they should be used when performing an undo push. - Mode switching is used to ensure the state is correct before undo data is restored. - Some undo types accumulate changes (image & text editing) others store the state multiple times (with de-duplication). This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`. - Each undo step stores ID datablocks they use with utilities to help manage restoring correct ID's. Needed since global undo is now mixed with other modes undo. - Currently performs each undo step when going up/down history Previously this wasn't done, making history fail in some cases. This can be optimized to skip some combinations of undo steps. grease-pencil is an exception which has not been updated since it integrates undo into the draw-session. See D3113
2017-12-04Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenloader/BLO_readfile.h source/blender/blenloader/intern/readfile.c source/blender/windowmanager/intern/wm_files_link.c
2017-12-04Cleanup: link/append: get rid of booleans in func parameters.Bastien Montagne
One or two are OK, but more make it rather unreadable, and future work is likely to require more toggle specific behavior here. So switched to bitflags, switching from short to int and using 16 upper bits for 'internal' ones defined in BLO_readfile.h, combined with 'public' ones from user interaction, defined in DNA_space_types.h
2017-11-23Rename any instance of scene layer or render layer in code with view layerDalai Felinto
The RenderResult struct still has a listbase of RenderLayer, but that's ok since this is strictly for rendering. * Subversion bump (to 2.80.2) * DNA low level doversion (renames) - only for .blend created since 2.80 started Note: We can't use DNA_struct_elem_find or get file version in init_structDNA, so we are manually iterating over the array of the SDNA elements instead. Note 2: This doversion change with renames can be reverted in a few months. But so far it's required for 2.8 files created between October 2016 and now. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D2927
2017-11-09Cleanup: Use full name for scene_layer in blenloaderSergey Sharybin
2017-10-23Cleanup: Remove unused function declarationJulian Eisel
2017-10-17Merge branch 'master' into blender2.8Campbell Barton
2017-10-17Cleanup: use 'e' prefix for enum typedefsCampbell Barton
Convention was only followed loosely, apply to DNA where changes aren't likely to conflict. (Skipped ModifierType for eg).
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
2017-05-26Implement support for Append objects in Blender 2.8Dalai Felinto
Note for users ============== The active_layer option used for the filebrowser operators is now called active_collection. If there is no collections in the scenelayer or if this option is not selected we automatically create a new collection for the new objects. This is the same behaviour of trying to add a new object when there is no collection. Note for developers =================== For those cases I moved the object user count handling from readfile to the scene collection system. It's working fine for those, but we still need to re-visit this for Add objects, and Duplicate - In those cases the usercount is 2 when it should be 1. Reviewers: mont29, sergey Differential Revision: https://developer.blender.org/D2686
2017-03-16Add BKE_blendfile_userdef_read_from_memoryCampbell Barton
Needed to read user-preferences from in-memory startup.blend Also skip data-blocks when reading preferences.
2017-03-16Fix BGE building.Bastien Montagne
When you use typedef'ed enum, you need to define all supported values explicitely in enum, else compiler goes grumpy...
2017-03-15Load user-preferences before startup fileCampbell Barton
Internal change needed for template support. Loading the user preferences first so it's possible for preferences to control startup behavior. In general it's useful to load preferences before data-files, so we know security settings for eg.