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
2022-01-26Cleanup: spelling in commentsCampbell Barton
2022-01-25Fix T93058: Crash on opening old pre-2.80 .blend files.Bastien Montagne
Layer resync code would not yet fully properly deal with all possible invalid status of ViewLayer comming from those older files. Now put 2.80-doversion specific fixes into their own dedicated function, so that they do not affect actual regular layer resync code anymore. Also added some sanity-checks in main `BKE_layer_collection_sync` code.
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-11-10Cleanup: Move info_stats.c to C++Hans Goudey
2021-07-26LayerCollections: Add a way to prevent their resync with Collection hierarchy.Bastien Montagne
This is an easy & safe, yet not-so-nice way to address the LayerCollections vs. Collections hierarchy resync problem. Currently this resync is enforced everytime something changes in the Collections hierarchy, which is extremely inneficient, and can even produce 'loss' of LayerCollection data during complex Collection processes. Current example is during Library Overrides resync process. New code: * Makes resync significantly faster (between 10 and 15%). * Fixes 'disappearing' layer collections settings on sub-collections' layers. NOTE: This is not a proper fix for the underlying issue. However, implementing and testing the 'lazy update' solution as proposed by {T73411} requires a significant amount of time (especially in testing and tracking all places where code would need to ensure LayerCollections are up-to-date), which is not possible currently. Differential Revision: https://developer.blender.org/D11889
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2021-04-25Revert "Info Editor: move to c++"Ray Molenkamp
This reverts commit 9cce18a5858cb93da626f5f0fd7e09cd66637e05. rB9cce18a5858c broke the build in unforeseen ways, not easily fixable. revert for now, so master will at least build again.
2021-04-24Info Editor: move to c++Jacques Lucke
I'm currently doing some experiments in the info editor and for that it is easier if the info editor is in c++ already.
2020-12-15Cleanup: make formatJacques Lucke
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-12-04EEVEE: Arbitrary Output VariablesJeroen Bakker
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the render pass tab and used in shader materials. Both Object and World based shaders are supported. The AOV can be previewed in the viewport using the renderpass selector in the shading popover. AOV names that conflict with other AOVs are automatically corrected. AOV conflicts with render passes get a warning icon. The reason behind this is that changing render engines/passes can change the conflict, but you might not notice it. Changing this automatically would also make the materials incorrect, so best to leave this to the user. **Implementation** The patch adds a copies the AOV structures of Cycles into Blender. The goal is that the Cycles will use Blenders AOV defintions. In the Blender kernel (`layer.c`) the logic of these structures are implemented. The GLSL shader of any GPUMaterial can hold multiple outputs (the main output and the AOV outputs) based on the renderPassUBO the right output is selected. This selection uses an hash that encodes the AOV structure. The full AOV needed to be encoded when actually drawing the material pass as the AOV type changes the behavior of the AOV. This isn't known yet when the GLSL is compiled. **Future Developments** * The AOV definitions in the render layer panel isn't shared with Cycles. Cycles should be migrated to use the same viewlayer aovs. During a previous attempt this failed as the AOV validation in cycles and in Blender have implementation differences what made it crash when an aov name was invalid. This could be fixed by extending the external render engine API. * Add support to Cycles to render AOVs in the 3d viewport. * Use a drop down list for selecting AOVs in the AOV Output node. * Give user feedback when multiple AOV output nodes with the same AOV name exists in the same shader. * Fix viewing single channel images in the image editor [T83314] * Reduce viewport render time by only render needed draw passes. [T83316] Reviewed By: Brecht van Lommel, Clément Foucault Differential Revision: https://developer.blender.org/D7010
2020-11-16Grease Pencil: adjust behavior of target object detectionCampbell Barton
First detect the other selected object, then check it can be written to. Otherwise the target object could be the first one found when looping over objects which is random from the user perspective. Move the type check to the operator, which also checks the data isn't library data which was being ignored.
2020-11-13GPencil: Remove ID from operators to fix T82597Antonio Vazquez
Instead to use the ID of the object, now the parameter is an Enum with Selected object or New. If use selected mode, the first grease pencil object selected is used. If none of the selected objects is a grease pencil object, a new object is created. Small cleanup changes to the original patch. Differential Revision: https://developer.blender.org/D9529
2020-11-06Refactor: move remaining ViewLayer .blend I/O to blenkernelJacques Lucke
Ref T76372.
2020-11-06Cleanup: sort structs, filesCampbell Barton
2020-10-29Refactor: move Collection .blend I/O to IDTypeInfo callbacksJacques Lucke
This one was a bit more tricky, because the file loading is mixed with versioning code and because collections are embedded into scenes. All tests that passed before, still pass.
2020-09-09Cleanup: Remove warning re: const qualifier discardedDalai Felinto
Warning introduced on a5db981b0ea044313239c3cc2ee92d.
2020-09-09Fix T76346: Moving objects in outliner doesn't update local collectionsDalai Felinto
The fix involves going over ALL the possible combinations of viewlayers and viewports and re-sync. I tested this with multiple windows, multiple scenes and multiple viewlayers. Since (for now?) the operation of syncing the local layer collections is not too expensive, this is not so bad. In theory we could improve this by checking if the collection the object was moved to and from is in the scene before iterating over it. I don't think it is worthy though. Thanks Arun Parolikkal for the initial attempt on D8342. Final patch reviewed by Brecht Van Lommel.
2020-08-30Object: add ED_object_array_in_mode_or_selectedCampbell Barton
Use this utility function for render-shading & weight paint modes. This adds support for edit-mode & pose-mode where all objects in the mode are used in this case instead of the selected objects.
2020-08-30BKE_layer: add BKE_view_layer_array_selected_objects_paramsCampbell Barton
Useful for similar situations as BKE_view_layer_array_from_bases_in_mode_params without depending on the active objects mode.
2020-08-30Cleanup: pass v3d as const to view layer utilitiesCampbell Barton
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-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-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
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-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-25Cleanup: redundant struct declarationsCampbell 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-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-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-02Cleanup: empty expression statement warningCampbell Barton
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-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-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
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-06Outliner visibility unification: Implement 3 levels of viewport visibilityDalai Felinto
Now collection and objects can be either: * Disabled for all the view layers. * Hidden for a view layer but not necessarily for all others. * Visible for a view layer but not necessarily for all others. Regarding icons: Whatever we decide to use for the "Hidden for all view layers" needs to be a toggle-like icon. Because when viewing "Scenes" instead of "View Layer" in the outliner we should be able to edit the collection "Hidden for all the view layers" as an on/off option. The operators are accessible via a Visibility context menu or shortcuts: * Ctrl + Click: Isolate collection (use shift to extend). * Alt + Click: Disable collection. * Shift + Click: Hide/Show collection and its children (objects and collections) Things yet to be tackled: * Object outliner context menu can also get a Visibility sub-menu. * Get better icons for viewport enable/disable. Note: * When using emulate 3 button mouse alt+click is used for 2d panning. In this case users have to use the operator from the menu. See T57857 for discussion. Patch: https://developer.blender.org/D4011 Reviewers: brecht and sergey Thanks to the reviewers and William Reynish and Julien Kasper in particular for the feedback.
2019-02-05Per view-layer collection visibilityDalai Felinto
[re-committing] We still control this in the viewport collections visibility menu. But now we are actually changing the visibility of the collections, not of the objects. If a collection is indirectly invisible (because one of its parents are invisible) we gray it out. Also if you click directly in the collection names, it "isolates" the collection by hiding all collections, and showing the direct parents and all the children of the selected collection. Development Note: Right now I'm excluding the hidden collections from the depsgraph. Thus the need for tagging relations to update. If this proves to be too slow, we can change.
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-26Cleanup: redundant definesCampbell Barton
Comment or remove unused defines.
2019-01-08Fix inconsistent naming and behavior for base visible/selected/editable.Brecht Van Lommel
Fixes T60251.
2018-12-28Cycles: restore old sample and material override settings for view layers.Brecht Van Lommel
Since there will be no view layer overrides in 2.80, this is needed still.
2018-12-14Fix T58351: Make Single User crashesDalai Felinto
2018-12-01Fix T58412: in weight paint + pose mode certain armature operations crash.Alexander Gavrilov
The cause is that FOREACH_OBJECT_IN_MODE_BEGIN assumed that the active object is in the correct mode, which is wrong in this case. It also only considered objects of the same type as active, which had to be replaced with an explicit type parameter.
2018-11-28Outliner/visibility: revert changes for now until we find better solutions.Brecht Van Lommel
See T57857 for discussion. This reverts: "Outliner: Do not gray out empty collections" 4521d3e7074d2e08ca813e1f4a2297f5000f335b. "Remove eye column from the outliner" fd16b359977c8932ada8db4ff0e43d0402fdc280. Fix/workaround issues in pose and edit mode" 6d2e2e30d50c40f302b62d3601b5742d7c7056c6. "Per view-layer collection visibility" 4de6a210c69fe254518ca8d6c860782c54f03749.
2018-11-28Per view-layer collection visibilityDalai Felinto
We still control this in the viewport collections visibility menu. But now we are actually changing the visibility of the collections, not of the objects. If a collection is indirectly invisible (because one of its parents are invisible) we gray it out. Also if you click directly in the collection names, it "isolates" the collection by hiding all collections, and showing the direct parents and all the children of the selected collection. Development Note: Right now I'm excluding the hidden collections from the depsgraph. Thus the need for tagging relations to update. If this proves to be too slow, we can change.
2018-11-25Local ViewDalai Felinto
Bring back per-viewport localview. This is based on Blender 2.79. We have a limit of 16 different local view viewports. We are using both the numpad /, as well as the regular /. Missing features: * Hack to make sure lights are always visible. * Make rendered mode with external engines to support this as well (probably just need to support this in the RNA iterators). * Support over 16 viewports by taking existing viewports out of local view. The code can use a cleanup pass in the future to unify the test to see if an object is visible (or we can use TESTBASE in more places).
2018-11-08Cleanup: use explicit 'select_and_set_active' API nameCampbell Barton
Selection should be separated from active state and handled by higher level code (operators/editors) instead of happening automatically.
2018-10-02Fix for POSE_OT_select_mirrorDalai Felinto
It was not taking duplicated objects into consideration, so the operator would only work if you had an off number of objects with the same armature.