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
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.
2016-06-22ID-Remap, step two: add some user-level tools.Bastien Montagne
This commit adds operators and Outliner menu entries to reload or relocate a library, and to delete or replace a datablock. RNA ID API is also extended to allow ID deletion and remapping from python. Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2016-01-11Support for copy/paste groupsCampbell Barton
Developer node, now bases are instanced by give_base_to_objects, needed for correct OB_FROMGROUP base-flag assignment.
2016-01-08Koro request: add 'active layer' and 'selected' options to view3D' paste ↵Bastien Montagne
operator. Those two are ON by default, since I think it's most common expected behavior (as with append/link ops).
2015-10-15Cleanup: BLO_read: linking API arg order and name.Bastien Montagne
linking API funcs would use 'name, idcode', when all other code here uses (more sensible) 'idcode, name'. Also, use 'name' arg name when we expect a bare name, without the prepended ID code, and 'idname' arg name when we expect a complete ID name. And here too, idcode shall be short, not int!
2015-10-12Cleanup & rework of BLO_linking code.Bastien Montagne
This commits does mostly two things: * Get rid of bContext parameter: I can see no real good reason to pass such a high-level data to such low-level code... It also makes it more difficult to call when you do not have a context available. * Cleanup the instantiating part. Last point is the most risky - previous code was sometimes quite confusing and hard to follow, from tests nothing behaves differently in new code, but some hidden corner case may show up. Anyway, no change in behavior is expected from this commit, if it happens please file a bugreport!
2015-10-12Cleanup: BLO: use proper typedef for expand_doit callback.Bastien Montagne
2015-10-12Cleanup: BLO: move func doc comments to definitions of functions.Bastien Montagne
Follows our conventions and makes include file itself much cleaner.
2015-10-12Cleanup in BLO API: rename 'append' funcs to 'link', since none do append, ↵Bastien Montagne
but only linking of datablocks!
2015-08-27Make .blend file thumbnail reading simpler and more coherent, read/store ↵Bastien Montagne
them when reading in background mode. Primary goal of this commit is to fix an annoying issue - when processing and saving .blend files in background mode you lose their thumbnails, since it can only be generated with an OpenGL context. Solution to that is to read .blend thumbnail while reading .blend file (only done in background mode currently), and store it in Main struct. Also, this lead to removing .blend file reading code from thumb_blend (no need to have doublons). We now have a small interface in regular reading code area, which keeps it reasonbaly light by only reading/parsing header info, and first few BHead blocks. This makes code reading .blend thumbnail about 3 to 4 times slower than previous highly specialized one in blend_thumb.c, but overall thumbnail generation of a big .blend files folder only grows of about 1%, think we can bare with it. Finally, since thumbnail is now optionally stored in Main struct, it makes it easy to allow user to define their own custom one (instead of auto-generated one). RNA API for this was not added though, accessing that kind of .blend meta-data has to be rethought a bit on a bigger level first. Reviewers: sergey, campbellbarton Subscribers: Severin, psy-fi Differential Revision: https://developer.blender.org/D1469
2015-08-18Replace 'BLO_is_a_library' by 'BLO_library_path_explode'.Bastien Montagne
This new func will be fully used by upcomming code (it mostly adds the extraction of library item name as well as library file and ID group).
2015-05-20doxygen: corrections/updatesCampbell Barton
Also add depsgraph & physics
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-02-15Cleanup: BLI_listdir (direntry): get rid of usage of raw malloc/free here.Bastien Montagne
No reason at all not to use MEM_xxx as everywhere else, especially confusing when members of direntry **are** MEM_-allocated (relname, etc.)!
2015-01-19Cleanup: unused Global flags.Campbell Barton