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-01-30Fix FOREACH_OBJECT_RENDERABLE using stack dataDalai Felinto
Since 30a966a7262308 when I removed the recursion, the code was still relying on stack data. This would crash in release often, and it should crash always. Big thanks to Sergey Sharybin for spotting the issue.
2018-01-22Collections/Layer cleanup: Remove all reference to filter objectsDalai Felinto
This was not implemented yet. So it's a bit pointless to have all this placeholder code around without any functionality coming out of it.
2017-12-26Depsgraph: Fix copy-on-write assert when freeing Freestyle configDalai Felinto
We were bumping user count when duplicating viewlayer and its freestyleconfig depending on the flag, however when freeing we were always decreasing user count. This fixes this and get rid of the assert when running: `--factory-startup --enable-copy-on-write` And closing Blender.
2017-12-15Group collection viewport/render options and remove collection visibilityDalai Felinto
Users can change the group collection visibility in the outliner when looking at groups. Regular collections on the other hand don't have any special visibility control, if you need a collection to be invisible during render, either don't link it into the view layer used for F12, or disable it. This includes: * Updated unittests - update your lib/tests/layers folder. * Subversion bump - branches be aware of that. Note: Although we are using eval_ctx to determine the visibility of a group collection when rendering, the depsgraph is still using the same depsgraph for the viewport and the render engine, so at the moment the render visibility is ignored. Following next is a workaround for this separately to tag the groups before and after rendering to tackle that.
2017-12-04Cleanup: whitespaceCampbell Barton
2017-12-01Groups and collection: initial integrationDalai Felinto
Since we are ditching layers from Blender (2.8) we need a replacement to control groups visibility. This commit introduces collections as the building blocks for groups, allowing users to control visibility as well as overrides for groups. Features ======== * Groups now have collections This way you can change the visibility of a collection inside a group, and add overrides which are part of the group and are prioritized over other overrides. * Outliner Groups can inspect their collections, change visibility, and add/remove members. To change an override of a group collection, you need to select an instance of the group, and then you can choose "group" in the collection properties editor to edit this group active collection instead of the view layer one. * Dupli groups overrides We can now have multiple instances of the same group with an original "override" and different overrides depending on the collection the instanced object is part of. Technical ========= * Layers We use the same api for groups and scene as much as possible. Reviewers: sergey (depsgraph), mont29 (read/write and user count) Differential Revision: https://developer.blender.org/D2892
2017-11-23Cleanup: Rename ViewLayer *sl > ViewLayer *view_layerDalai Felinto
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-22SceneRenderLayer > SceneLayer: Convert Z-MaskDalai Felinto
Note: Cycles still need to implement the per-object holdout (similar to how we do shadow catcher).
2017-11-22SceneRenderLayer > SceneLayer: Convert samples_overrideDalai Felinto
Note: Cycles still need to handle its own doversion for theses cases and (1) Remove the override as it is (2) Add a new override (scene.cycles.samples) if scene.cycles.use_layer_samples != IGNORE Respecting the expected behaviour when scene.cycles.use_layer_samples == BOUNDED.
2017-11-22SceneRenderLayer > SceneLayer: Convert material_overrideDalai Felinto
2017-11-14Cleanup: order from a-z structs in BKE_collection.h and BKE_layer.hDalai Felinto
2017-11-08Farewell Scene->baseDalai Felinto
While getting rid of Scene->base we got the following fixes: * Fix "Convert To" operator * Fix "NLA allowing to selected objects that are not selectable * Fix scene.objects (readonly, no option to link/unlink) Note: Collada needs to use the context SceneLayer for adding objects however I added a placeholder, so Collada maintainers can fix this properly.
2017-10-16Workspace: Move engines to workspace and Properties Editor cleanupDalai Felinto
Engine is not stored in WorkSpaces. That defines the "context" engine, which is used for the entire UI. The engine used for the poll of nodes (add node menu, new nodes when "Use Nodes") is obtained from context. Introduce a ViewRender struct for viewport settings that are defined for workspaces and scene. This struct will be populated with the hand-picked settings that can be defined per workspace as per the 2.8 design. * use_scene_settings * properties editor: workshop + organize context path Use Scene Settings ================== For viewport drawing, Workspaces have an option to use the Scene render settings (F12) instead of the viewport settings. This way users can quickly preview the final render settings, engine and View Layer. This will affect all the editors in that workspace, and it will be clearly indicated in the top-bar. Properties Editor: Add Workspace and organize context path ========================================================== We now have the properties of: Scene, Scene > Layer, Scene > World, Workspace [Scene | Workspace] > Render Layer > Object [Scene | Workspace] > Render Layer > Object > Data (...) Reviewers: Campbell Barton, Julian Eisel Differential Revision: https://developer.blender.org/D2842
2017-09-20Layer collection enable flagDalai Felinto
Right now this is exposed in the outliner, though all this (visible/selectable/enable) should be moved to a new panel soon. This removes objects from the depsgraph when the collection is disabled. It allows you to "hide" lamps but still having them lighting the scene. Same for light probes and other support objects. Pending tasks: * Have depsgraph to include invisible objects in the DEG_OBJECTS_ITER, and then have Eevee and other engines to make a distinction between an invisible and a visible object. (for example, we probably want invisible objects to not show in the viewport, but cast shadows and show up in light probes). * Change how we evaluate collection settings so that an invisible collection can force an object to be invisible. Reviewers: campbellbarton Subscribers: sergey Differential Revision: https://developer.blender.org/D2848
2017-08-16Pass EvaluationContext instead of bContextCampbell Barton
2.8x branch added bContext arg in many places, pass eval-context instead since its not simple to reason about what what nested functions do when they can access and change almost anything. Also use const to prevent unexpected modifications. This fixes crash loading files with shadows, since off-screen buffers use a NULL context for rendering.
2017-07-18Layer cleanup: get rid of one of the placeholder functionsDalai Felinto
2017-07-17Removing unused layer TODO placeholdersDalai Felinto
2017-07-14Workspace: Fix crash on preview, and sanitize placeholder functionsDalai Felinto
This commit effectively makes workspace switching useless as far as the active scene layer goes. The functions from the scene layer API to get the correct scene layer from "context" were a placeholder to be addressed by the workspace commit. When workspace was merged, however G.main was used as a replacement to pass the correct argument for the functions. As it turned out (surprise!) this leads to crash on render preview. We need to get rid of: * BKE_scene_layer_context_active_ex_PLACEHOLDER * BKE_scene_layer_context_active_PLACEHOLDER And either use SceneLayer explicitly or replace it by: * BKE_scene_layer_from_workspace_get
2017-06-09Fix crash when deleting active workspace render-layerJulian Eisel
Also fixes some failing unit-tests for render-layers.
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-26Rename BKE_layer_collection_active > BKE_layer_collection_get_activeDalai Felinto
2017-05-26Move util function to add new scene collection when active is not available ↵Dalai Felinto
from object to layer
2017-05-18Rename Iterator struct to BLI_IteratorDalai Felinto
2017-05-10Expand the collection settings API to support float arraysDalai Felinto
We still need to update the RNA interface to access those. But since there is no RNA_def_property_float_array_funcs I'm not sure how many changes this will require.
2017-05-05Implement overridable scene render settingsDalai Felinto
This add a new set of (possible) render settings that can be defined at the scene level and overridable at the scene layer level. Once we get workspaces we can either add workspace inbetween scene and scene layer evaluation. Or to replace layer settings, to avoid extra confusion to users. An example of this setting is "samples", as implemented now for the clay engine.
2017-05-04Fix "doversion" of collection settings for collectionsDalai Felinto
For collections we do not need a doversion as granular as the scene one. However if a new engine settings is added we need to take care of it.
2017-05-03Validate collection properties at readileDalai Felinto
The alternative would be to do version bump + doversioning every time a new property is added.
2017-04-24Layer cleanup: Rename _Iterator_ > _iterator_Dalai Felinto
2017-04-24FOREACH_SELECTED_BASE iteratorDalai Felinto
2017-04-21Move DEG_OBJECT_ITER inside depsgraphDalai Felinto
2017-04-21Include the set in the depsgraph objects iteratorDalai Felinto
Pending: Include the set in the rna depsgraph.objects In fact it would be nice to unify them both. However this will likely change once Depsgraph incorporate this iterator, so I'm not sure we should bother with that. Related to T51203
2017-04-20Fix T51215: depsgraph evaluation of collection properties (overrides)Dalai Felinto
2017-04-18Use better workaround ofr getting scene layer for Derivedmesh's maskSergey Sharybin
This replaces access to the first scene layer (which was wrong) with a linear lookup of scene layer by it's active index. This seems to be a better temporary solution to have things working for until we've got proper workspace, depsgraph and it's per-layer storage in place.
2017-04-13Layer collection settings APIDalai Felinto
This way we can set a property via RNA, and also force an update of scene layer (which I am using for unittesting)
2017-04-01Blender 2.8: Hook of layer collections evaluation in DEGSergey Sharybin
This moves selectability/visibility flag flush from some hardcoded places in the code to depsgraph. This way it is possible to simply tag depsgraph to update those flags and rest it'll do on its own. Using depsgraph for such flush is an overkill: those flags are fully static and can not be animated, so it doesn't really make sense to hook only those to depsgraph. However, in the future we will have overrides on collections, which ideally would need to be animatable and drivable and easiest way to support this is to do this on depsgraph level, so it ensures proper order of evaluation for animation and drivers. And it seems logical to do both overrides and flags flush from depsgraph from this point of view. This commit also includes the evaluation of IDProperty for collections, which basically are just another form of override. So once we implement the other kind of overrides the flushing and collection evaluation won't change. Patch by Sergey Sharybin and Dalai Felinto
2017-03-30Layers: use IDProperty and override collection properties systemDalai Felinto
First this replace a custom data struct with IDProperty, and use IDProperty group merge and copying functions. Which means that a collection property setting is only created if necessary. This implements the "Layer Collection settings" override system, as suggested in the "Override Manifesto" document. The core is working, with Scene, LayerCollection and Object using a single IDProperty to store all the render settings data. Next step is to migrate this to depsgraph. Note: Clay engine "ssao_samples" was hardcoded to 32 for now. It will come back as part of "Workspace Settings" later. Many thanks for Bastien Montagne for the help with the UI template nightmare ;) Differential Revision: https://developer.blender.org/D2563
2017-03-17Cleanup: Use proper indentationSergey Sharybin
2017-03-10Outliner: Support dragging objects into different collectionsJulian Eisel
Doing so will remove the object from the old collection and insert it into the new one.
2017-03-09Layers: move LayerCollectionDalai Felinto
This is to be used from the Outliner, when dragging and dropping collections from the Active Render Layer It also includes a cleanup on the outliner so it calls the new functions. Note: the outliner still needs fix to allow all the functionality here exposed. But this will be tackled by Julian Eisel later.
2017-03-09Layers: move SceneCollectionDalai Felinto
This is to be used from the Outliner, when dragging and dropping. It does not include moving LayerCollection (from Active Render Layer)
2017-03-02Get UI ready for using drag & drop to nest a collection into another oneJulian Eisel
Nothing happen yet when it's supposed to insert the collection into another one, that part will be handled by @dfelinto. See gif for demo of how it works UI wise: {F500337} Also fixed off-by-one error in utility function.
2017-03-01Outliner: Support dragging object into collectionJulian Eisel
Doing this will add the object to the collection.
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-18Fixup for last commit :/Dalai Felinto
2017-02-18Fix crash introduced in engine separation (50fb3ea3)Dalai Felinto
Basically DEG_OBJECT_ITER (or rather, BKE_scene_layer_engine_settings_update) wasn't creating Object->collection_settings data for invisible objects. Now I'm removing those objects from the loop entirely. If we are to bring them back we need to either create CollectionEngineSettings dat from them or to skip them in DRW_mode_cache_populate.
2017-02-17bug in DEG_OBJECT_ITERDalai Felinto
2017-02-16Doversion: reset layer collection properties when neededDalai Felinto
This prevents crashes when a file was saved with 2.8, but a new engine settings property was created. In those cases any previous collection settings are wiped out. We can do an elegant merge soon.
2017-02-15Layers: Separate between scene render layer (F12) and context render layer ↵Dalai Felinto
(everything else) For now they are the same. However with workspaces they will be different, and should be treated differently.
2017-02-15Collections Settings: Added Bool type.Clément Foucault