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-08-01Cleanup: spellingCampbell Barton
2020-07-21Cleanup: `layer_collection_sync`: use `LISTBASE_FOREACH_MUTABLE`.Bastien Montagne
2020-07-21Cleanup: `layer_collection_sync`: use proper naming.Bastien Montagne
Previous ones were extremely confusing and innacurate (probably inherited from older versions of scene collections?). Also, use named fields in struct initialization, much much safer and cleaner than anonymous, positionned-based thing.
2020-05-29Fix T73972: Collection in outliner grayed out when all collection children ↵Manuel Castilla
are disabled There is no reason to have the children enable/disable state to influence the parent collection. Specially considering that the parent collection itself can have objects that would be visible. Reviewed by: dfelinto, brecht Differential Revision: http://developer.blender.org/D7864
2020-04-21Fix T75969: view layer add with Copy Settings does not copy all dataBrecht Van Lommel
2020-04-09Collections: preserve exclude flag of child collections when unexcludingSzymon Ulatowski
Excluding a collection also changes the exclude setting on all child collections so that it is possible to selectively enable some children without the parent being enabled. This change makes it so that if you unexclude the parent, the exclude setting of children are restored again instead of being permanently lost. Original patch by Szymon with modifications by Brecht. Differential Revision: https://developer.blender.org/D7016
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-03-26Add option to Copy the active view layer, and add an empty view layerChris Clyne
Modify the view layer add operator (and underlying `BKE_view_layer_add`) to allow for copying the current view layer, as well as adding a new one but with all LayerCollections disabled by default (this is important for heavy scenes where currently adding view layers can take a long time due to enabling every collection by default). Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6862
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-11-04Fix T71250: ID user decrement error with ID properties in ViewLayerLukas Stockner
Credit for the original patch goes to @scorpion81.
2019-10-16Fix multi-object edit mode and local view/collectionsDalai Felinto
Before this patch you could go to a local view with a single object, while you had other objects also in edit mode, and your operators would affect all objects even the ones outside your local view (same for local collection). Differential Revision: https://developer.blender.org/D6064
2019-10-15Fix T70838: crash on cycles render after recent fixDalai Felinto
My bad for not figuring out how to run our unittests since I got back to Windows.
2019-10-15Fix T70670: Hidden collections are still rendered by Cycles in the ViewportDalai Felinto
Now local collections are fully working with cycles preview, while the collection visibility bug is fixed. Local collections were not working with cycles viewport even before the recent commit to allow users to show collections that are hidden in the view layer. It just got worse with said commit (0812949bbc3d). Differential Revision: https://developer.blender.org/D6034
2019-10-09Local Collections: Allow users to show hidden collectionsDalai Felinto
Users now can turn on in a viewport collections that are temporarily hidden (eye) in the view layer. Design task: T61327 As for the implementation, I had to decouple the visibility in the depsgraph from the visibility in the view layer. Also there is a "bug" that in a way was there before which is some operators (e.g., writing a text inside of a text object, tab into edit mode) run regardless of the visibility of the active object. The bug was present already (with object type visibility restriction) in 2.80 so if we decide to tackle it, can be done separately (I have a patch for it though P1132). Reviewed by: brecht (thank you) Differential Revision: D5992
2019-09-24Fix T70080: Newly created objects not visible with local collectionsDalai Felinto
The tricky part here is to support a hidden parent and a "visible" child collection. In this case the object should obviously be invisible. It is all working now.
2019-09-24Make new objects (from enabled collections or append) visible to local viewsDalai Felinto
This fix T67162.
2019-09-19Fix crash in local collections with excluded layerJulian Eisel
Steps to reproduce were: * Add a new collection * Put an object into it * Exclude the selection (the checkbox in front of the name) * Enable "Local Collections" in any viewport -> Crash Did not skip the excluded collections, causing an unsuccessful object lookup (returned null-pointer).
2019-09-19Fix T66154: viewlayer hide/exclude settings getting lost for linked collectionsBrecht Van Lommel
The problem was that the object and collection pointers in Base and LayerCollection would get lost of file read. Normally such ID pointers would be resolved by pointing to an ID_ID placeholder which has the datablock name, and then replacing it will the real datablock. However ID_ID is only written for directly linked datablocks. This adds the concept of an indirectly linked datablock with a weak reference to it. For this we write an ID_ID_WEAK_REF code, which is a reference that will only be resolved if the datablock was read for another reason. Differential Revision: https://developer.blender.org/D4416
2019-09-13Per-Viewport Collection VisibilityDalai Felinto
Support per-viewport collection visibility options. Note 1: There is no way to show a collection that was not visible before due to depsgraph. Otherwise we would risk having all the collections in the depsgraph and I believe this is not the idea. An alternative would be to have a new depsgraph for viewports that are not local. Something to keep in mind if we do per-viewport current frame in the future. So for now what we do is to only allow collections visibility to be disabled/hidden in this mode. Note 2: hide_viewport (the eye icon) doesn't really matter for depsgraph. So after the merge we can still ignore it to show the collections locally in a viewport with no problems for the depsgraph. Reviewers: brecht, sergey Subscribers: billreynish Related task: T61327 Differential Revision: https://developer.blender.org/D5611
2019-08-16Collections: change active if hidden or excludedNathan Craddock
When the active collection is hidden or excluded, change the active collection to the first visible parent collection. This behavior existed previously for excluding collections, and is now expanded to also switch the active collection when viewport hidden or restricted. This does not prevent viewport hidden or restricted collections from being reactivated later. This could be added as a separate commit. Excluded collections cannot be activated, so it may make sense to extend this behavior to hiding collections.
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-18Fix T64312: Selection inconsistencies when switching collectionsDalai Felinto
Basically layer_collection_sync was calling BKE_base_eval_flags right away while iterating over the bases. However when a parent/sibling collection is to influence the collection flag of an object that exists in more than one collection, it is too late since we deselect the object in BKE_base_eval_flags right away. Related to T64312. Reviewers: sergey, brecht Differential Revision: https://developer.blender.org/D5243
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-06-08Collections: Never change the collection views visibility when unhiding itDalai Felinto
How to reproduce: use 1-10 to change the visible collection. If the collection was globally invisible, it would be set to globally visible. This was a left over from the previous collection visibility design. Now that we have a more clear separation between temporary visibility (i.e., layer collection visibiilty) and a global visibility setting (i.e., collection visibility) we should keep them separated.
2019-06-03Fix T65448 - Outliner - Show all inside in disabled collection crashDalai Felinto
2019-05-16Refactor: Simplify ID Property freeingJacques Lucke
This also makes `IDP_CopyProperty` the "opposite" of `IDP_FreeProperty`, which is what I'd expect. Two refactoring steps: * rename IDP_FreeProperty to IDP_FreePropertyContent * new IDP_FreeProperty function that actually frees the property Reviewers: brecht Differential Revision: https://developer.blender.org/D4872
2019-05-15Outliner Restriction: Naming sanitization and iconDalai Felinto
No major API change here, only in the outliner restriction column variables (e.g., show_restrict_column_selectable > show_restrict_column_select). * Get rid of _INSTANCE (introduced on b1af68200159). * Differentiate (everywhere but the API) between HIDE (temporary) and VIEWPORT (global). * Use the expected icon for restrict viewport (same as objects and modifiers). * selectable > select
2019-05-11Outliner Visibility UpdateDalai Felinto
See T61578 for discussions and mockups. Visibility Options ================== We are adding more granular control over restriction columns in the outliner, exposing "indirect only" and "holdout" as options, and change the way users enable/disable collections in a viewlayer. We also rename the object viewport restriction to hide instance. So the options we have are: Collection ---------- * Render Visibility * Instance Visibility * Selectable (View) Layer Collection ----------------------- * Enable * Holdout * Indirect Only * Viewport Shortcuts ========= Isolate Collection ------------------ * Ctr + click isolates the collection. It turns all its parents and children "visible", and all the other collections "invisible". If ALL the collections were already properly set, we re-set the collections to their default value. Set Collection Inside Collections and Objects --------------------------------------------- * Shift + click: Set/unset inside collections and objects. We only set objects values as well when we are in View Layer mode and (obviously) when the objects have a matching property. Icons ===== Little reminder that we will need better icons for holdout, indirect only, and probably instanced (nothing wrong with the current, but it differs from the proposal when it is turned off). Also, we need to decide where do we want the modifier/bones/... icons to be (in which column) and ideally make sure their icons match the ones we use for collections/objects. At the moment those are using the screen icon, which is not being used by collections. Reviewers: brecht, billrey Subscribers: pablovazquez Differential Revision: https://developer.blender.org/D4823
2019-04-30Remove BKE_scene_object_base_flag_sync_from_objectDalai Felinto
Note the fix for T62865 is still working fine.
2019-04-30Refactor: Use object select API - ED_object_base_selectDalai Felinto
We had a mix of BKE_view_layer_base_select (harmless), and places where we simply set the BASE_SELECTED flag with no regard to its selectable state.
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell Barton
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-04-16Fix T63204: Toggle collection visibility with shiftDalai Felinto
Shift was always turning the collection visible. It now toggles, similar to what we had in 2.79.
2019-03-25Fix T62865: Make Single User after Objects to Scene must be done twice.Bastien Montagne
Selected status was not properly moved from new object to new created base. This prevented next steps (making obdata, materials etc. local) to ever happen.
2019-03-12Fix T62388: object.visible_get() not affected by object.hide_viewport.Brecht Van Lommel
After recent changes BASE_VISIBLE was not always disabled properly when the object is hidden. This refactors the code a bit to hopefully be more clear.
2019-03-08Cleanup: use plural names for Main listsCampbell Barton
Convention was not to but after discussion on 918941483f7e we agree its best to change the convention. Names now mostly follow RNA. Some exceptions: - Use 'nodetrees' instead of 'nodegroups' since the struct is called NodeTree. - Use 'gpencils' instead of 'grease_pencil' since 'gpencil' is a common abbreviation in the C code. Other exceptions: - Leave 'wm' as it's a list of one. - Leave 'ipo' as is for versioning.
2019-03-01Cleanup: Use const for static number.Campbell Barton
Also use double indent instead of mixed tab/spaces.
2019-02-28Split base flags on own and collection-definedSergey Sharybin
This allows to update base flags to a proper state then object's restriction flags are changed, without requiring to re-evaluate an entire tree of flags. Some old unused flags are were removed by this change, and also disabling menu items might not work the same as before. This is something we can bring back if it's really needed (the way how flags are handled did change since that interface code was done anyway, so code was looking weird anyway). Reviewers: brecht Differential Revision: https://developer.blender.org/D4420
2019-02-28Remove unused base flagSergey Sharybin
Was only set and read from a single location. Removing to keep things more manageable.
2019-02-27Move base flags evaluation to its own functionSergey Sharybin
No need to have iterator loop in the view layer evaluation, this only makes it more difficult to have base flags covered by the dependency graph. Other good thing is that we don't need to worry about whether base has been removed from the evaluated view layer or not. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D4414
2019-02-22Fix T61788: Hidden objects reappear after renderingDalai Felinto
The change in outliner and viewport visibility (897e047374fa) was made assuming the bases of the render and viewport depsgraph were independent. Thus we were deliberately setting base visibility when rendering: ``` /* When rendering, visibility is controlled by the enable/disable option. */ if (mode == DAG_EVAL_RENDER) { base->flag |= BASE_VISIBLE; } ``` However, we were syncing data back to the original depsgraph, leading to hidden viewport objects to re-appear. Reviewers: sergey Differential Revision: https://developer.blender.org/D4391
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-09Cleanup: Use ID_IS_LINKED instead of id.libDalai Felinto
2019-02-09Outliner visibility: Prevent changing linked objects and collectionsDalai Felinto
We still change their base/layer collection visibility, just not what would change the original ID datablock.
2019-02-06Remove no-longer needed functionDalai Felinto
2019-02-06Fixup for outliner visibility not changing disable stateDalai Felinto
Show Inside (shift + click) was still forcing objects to be visible.
2019-02-06Outliner visibility: Respect original viewport enable/disable stateDalai Felinto
Note: We still change it to the collection we are directly isolating/making visible and its parents (in the case of isolating). But no longer its children. Feedback and discussion on D4011. The motivation is that if we don't keep those locked the disable state becomes useless.
2019-02-06Outliner visibility unification: Prevent master collection visibility to changeDalai Felinto
Also satinizing the checks for master collection. The outliner tree iterators already take care of not including the master collection there.