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
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-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 Removal/RefactorDalai Felinto
This patch moves all the functionality previously in SceneRenderLayer to SceneLayer. If we want to rename some of these structs now would be a good time to do it, before they are in SceneLayer. Everything should be working, though I will test things further tomorrow. Once this is committed depsgraph can get rid of the workaround added in rna_Main_meshes_new_from_object and finish whatever this patch was preventing from being finished. This patch also adds a few placeholders for the overrides (samples, ...). These are obviously not working, so some unittests that rely on 'lay', and 'zmask' will fail. This patch does not addressed the change of moving samples to ViewRender (I have this as a separate patch and needs some separate discussion). Following next is the individual note of the individual parts that were committed. Note 1: It is up to Cycles to still get rid of exclude_layer internally. Note 2: Cycles still need to handle its own doversion for the use_layer_samples 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. Note 3: Cycles still need to implement the per-object holdout (similar to how we do shadow catcher). Note 4: There are parts of the old (Blender Internal) rendering pipeline that is still using lay, e.g., in shi->lay. Honestly it will be easier to purge the entire Blender Internal code away instead of taking things from it bit by bit. Reviewers: sergey, campbellbarton, brecht Differential Revision: https://developer.blender.org/D2919
2017-11-22SceneRenderLayer > SceneLayer: Convert material_overrideDalai Felinto
2017-11-22SceneRenderLayer > SceneLayer: Remove light_overrideDalai Felinto
2017-11-09Rename Scene macros back to their original _NEW less namesDalai Felinto
2017-11-06Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: intern/cycles/device/device.cpp source/blender/blenkernel/intern/library.c source/blender/blenkernel/intern/material.c source/blender/editors/object/object_add.c source/blender/editors/object/object_relations.c source/blender/editors/space_outliner/outliner_draw.c source/blender/editors/space_outliner/outliner_edit.c source/blender/editors/space_view3d/drawobject.c source/blender/editors/util/ed_util.c source/blender/windowmanager/intern/wm_files_link.c
2017-11-06Rename ID_IS_LINKED_DATABLOCK to ID_IS_LINKED.Bastien Montagne
This makes code closer to id_override/assent-engine ones, which introduce a new type of linked data, and hence reserve ID_IS_LINKED_DATABLOCK to real linked datablocks.
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-10-04Merge branch 'master' into blender2.8Sergey Sharybin
2017-10-04Cleanup: redundant castsCampbell Barton
2017-08-28Merge branch 'master' into blender2.8Sergey Sharybin
2017-08-28Make GS macro return proper IDType typeSergey Sharybin
Previously it was returning short, which was really easy to (a) compare against non-ID type value (b) forget to handle some specific value in switch statement. Both issues happened in the nearest past, so it's time to tighten some nuts here. Most of the change related on silencing strict compiler warning now, but there is also one tricky aspect: ID_NLA is not in the IDType enum. So there is still cast to short to handle that switch. If someone has better ideas how to deal with this please go ahead :)
2017-08-15Cleanup/refactor: no new general arg-less macros enforcing var names please!Bastien Montagne
We do have an history of those pieces of evil in our code, would be nice to get fully rid of it, but at the very least let's not add more of them in new code. :)
2017-07-18Outliner: Use scene_layer from contextDalai 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-30Merge branch 'master' into blender2.8Campbell Barton
2017-06-30Workaround T51934: Array's > SHRT_MAX aren't supportedCampbell Barton
2017-06-12Rename probe to light-probeCampbell Barton
Probe is a real general term, the new name is used often in docs online.
2017-06-09Probe: fix some missing bits / errors in RNA ...Clément Foucault
2017-06-08Replace all old DAG calls with direct calls to new DEG and remove ↵Luca Rood
BKE_depsgraph.h This removes BKE_depsgraph.h and depsgraph.c
2017-04-25Outliner: Re-build depsgraph when reordering collectionsDalai Felinto
Otherwise if we create a new collection, and drag a collection into it we either get a crash, or at the very least we dont get the visibility flags correct.
2017-04-24Outliner: Bring back bases when pertinentDalai Felinto
This partially reverts c4e34a84e0a4599a751758050528eef389bd061f Note: This is necessary for the "delete hierarchy" functionality
2017-04-12Outliner: Draw nested collections before objects of a collectionJulian Eisel
Collections may contain a huge list of objects, would be annoying having to scroll over it all the time to get to the nested collections.
2017-04-12Outliner: Fix objects of master collection not showing up in 'Master ↵Julian Eisel
Collection Tree'
2017-03-20Silence unused vars warningDalai Felinto
2017-03-15Outliner: Don't show master collection itself in "Master Collection Tree"Julian Eisel
It would always be the only highest-level element in the tree, without serving a real purpose. Even collapsing it wouldn't make much sense.
2017-03-11Fix unwanted expanding/collapsing of collections using drag & dropJulian Eisel
Turned out to be a quite easy fix. I thought the issue was that we couldn't identify the TreeStoreElem when (re)creating its TreeElement item correctly, because for non-ID elements that would be index dependent (= bad for drag & drop). Turns out that we're actually allowed to store custom data within the TreeStoreElem, the thing is just that it gets stored as ID pointer (highly ugly and highly misleading). Anyway, seems to work now so I won't complain too much :)
2017-03-10Insert into master collection when dragging above itJulian Eisel
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-10Improve outliner drag&drop feedback by using drop poll callbacksJulian Eisel
This way we can ensure the overlay to indicate where the item would be placed if it was dropped now is always at the correct place and doesn't mislead the user.
2017-03-10Gaah, managed to undo a previous fix somehow...Julian Eisel
Somehow undid rBc70eb873057 in rB8e303aae255.
2017-03-10Support drag & drop of collections across multiple hierarchy levelsJulian Eisel
Two issues are remaining, they'll be fixed separately: * Graphical feedback when dragging within the master collection is wrong * There's some bug where collections swap places instead, Dalai will investigate
2017-03-10Fix issues in outliner collection reordering functionJulian Eisel
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-02Outliner: add hooks for (yet to be implemented) layer reordering routinesDalai Felinto
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: Make deleting collections from "All Collections" mode workJulian Eisel
2017-02-28Cleanup: Add outliner_utils.c, move functions into itJulian Eisel
2017-02-28Outliner: Delete all selected collections, not just active oneJulian Eisel
There were some issues with how we store outliner tree elements: Apparently the only removable elements have been data-blocks so far. When recreating the TreeElements, their TreeStoreElem instances were mainly identified by their ID pointer. However non-data-blocks mostly depend on an index. For collections, such an index isn't a reliable measure though if we want to allow removing items. Depending on it for identifying the TreeStoreElem instance would cause some quite noticeable glitches (wrong highlights, two elements sharing highlight, etc). For now I've solved that by actually removing the TreeStoreElem that represents the removed element. A little limitation of this is that after undoing the removal, some information might get lost, like flags to store selection, or opened/closed state. A better solution that would also fix this issue would be having a real unique identifier for each non-data-block element, like an idname or even its data-pointer. Not sure if we can get those to work reliable with file read/write though, would have to investigate... Also added a general Outliner tree traversal utility.
2017-02-28Outliner: "All Collections" mode showing the master collection hierarchyJulian Eisel
Reordering is disabled for now. Link, unlink and override operators are only available while in "Active Layer" mode, not in "All Collections".
2017-02-27Outliner: Rename "Collections" display mode to "Active Render Layer"Julian Eisel
2017-02-26Fix outliner "Sort Alphabetically" having not workingJulian Eisel
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-15Layers: Show collection objects in OutlinerDalai Felinto
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-14Layer Macros: create the instance as part of the macroDalai Felinto
Instead of pre-initializing an instance prior to the macro, we do it as part of the macro itself now.
2017-02-13Outliner: allow for renaming of collection and small touch ups in theDalai Felinto
code Note: Master Collection should not be renamable, but also, it should be marked as MasterCollection (with an icon probably)
2017-02-09Support displaying collections in outlinerJulian Eisel
Adds a new outliner display mode "Collections" which draws the active collection. We might want to rename it to "Active Collection" if we don't plan to support showing other collections there. Also added the buttons for restricting visibility and selectability. @dfelinto, code in restrictbutton_collection_hide_cb and restrictbutton_collection_hide_select_cb is duplicated from rna_LayerCollection_hide_update and rna_LayerCollection_hide_select_update, maybe utility functions would be handy for this?