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-11-01Refactor: Rename Object->obmat to Object->object_to_worldSergey Sharybin
Motivation is to disambiguate on the naming level what the matrix actually means. It is very easy to understand the meaning backwards, especially since in Python the name goes the opposite way (it is called `world_matrix` in the Python API). It is important to disambiguate the naming without making developers to look into the comment in the header file (which is also not super clear either). Additionally, more clear naming facilitates the unit verification (or, in this case, space validation) when reading an expression. This patch calls the matrix `object_to_world` which makes it clear from the local code what is it exactly going on. This is only done on DNA level, and a lot of local variables still follow the old naming. A DNA rename is setup in a way that there is no change on the file level, so there should be no regressions at all. The possibility is to add `_matrix` or `_mat` suffix to the name to make it explicit that it is a matrix. Although, not sure if it really helps the readability, or is it something redundant. Differential Revision: https://developer.blender.org/D16328
2022-09-14ViewLayer: Lazy sync of scene data.Monique Dewanchand
When a change happens which invalidates view layers the syncing will be postponed until the first usage. This will improve importing or adding many objects in a single operation/script. `BKE_view_layer_need_resync_tag` is used to tag the view layer to be out of sync. Before accessing `BKE_view_layer_active_base_get`, `BKE_view_layer_active_object_get`, `BKE_view_layer_active_collection` or `BKE_view_layer_object_bases` the caller should call `BKE_view_layer_synced_ensure`. Having two functions ensures that partial syncing could be added as smaller patches in the future. Tagging a view layer out of sync could be replaced with a partial sync. Eventually the number of full resyncs could be reduced. After all tagging has been replaced with partial syncs the ensure_sync could be phased out. This patch has been added to discuss the details and consequences of the current approach. For clarity the call to BKE_view_layer_ensure_sync is placed close to the getters. In the future this could be placed in more strategical places to reduce the number of calls or improve performance. Finding those strategical places isn't that clear. When multiple operations are grouped in a single script you might want to always check for resync. Some areas found that can be improved. This list isn't complete. These areas aren't addressed by this patch as these changes would be hard to detect to the reviewer. The idea is to add changes to these areas as a separate patch. It might be that the initial commit would reduce performance compared to master, but will be fixed by the additional patches. **Object duplication** During object duplication the syncing is temporarily disabled. With this patch this isn't useful as when disabled the view_layer is accessed to locate bases. This can be improved by first locating the source bases, then duplicate and sync and locate the new bases. Will be solved in a separate patch for clarity reasons ({D15886}). **Object add** `BKE_object_add` not only adds a new object, but also selects and activates the new base. This requires the view_layer to be resynced. Some callers reverse the selection and activation (See `get_new_constraint_target`). We should make the selection and activation optional. This would make it possible to add multiple objects without having to resync per object. **Postpone Activate Base** Setting the basact is done in many locations. They follow a rule as after an action find the base and set the basact. Finding the base could require a resync. The idea is to store in the view_layer the object which base will be set in the basact during the next sync, reducing the times resyncing needs to happen. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15885
2022-09-01Cleanup: Remove/replace View Layer macros.Monique Dewanchand
This patch is a cleanup required before refactoring the view layer syncing process {T73411}. * Remove FIRSTBASE. * Remove LASTBASE. * Remove BASACT. * Remove OBEDIT_FROM_WORKSPACE. * Replace OBACT with BKE_view_layer_active_object. * Replace OBEDIT_FROM_VIEW_LAYER with BKE_view_layer_edit_object. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15799
2022-03-29LibOverride: Massive edits to 'editable' IDs checks in editors code.Bastien Montagne
Add new `BKE_id_is_editable` helper in `BKE_lib_id.h`, that supercedes previous check (simple `ID_IS_LINKED()` macro) for many editing cases. This allows to also take into account 'system override' (aka non-editable override) case. Ref: {T95707}.
2022-03-14RNA: Generate property declerations header, solving msg-bus C++ incompatibilityJulian Eisel
Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all RNA properties. This can be included in regular source files when needing to reference RNA properties statically. This solves an issue on MSVC with adding such declarations in functions, like we used to do. See 800fc1736748. Removes any such declarations and the related FIXME comments. Reviewed By: campbellbarton, LazyDodo, brecht Differential Revision: https://developer.blender.org/D13837
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-08-26Cleanup: Use `ID_IS_LINKED` instead of direct `id.lib` pointer check.Bastien Montagne
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-02-13Cleanup: spellingCampbell Barton
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-03-02Fix T74278: Light, Image Object, and Compositor Backdrop Viewer NodePhilipp Oeser
gizmos are too big Caused by rB9cac5fa681c5 which fixed the handles for the camera border gizmo (being much too small)-- which in turn was broken by rB98e4fbc7cc9e. Camera border gizmo sets up its matrix_space a bit differently [this is why we are getting very small values in gizmo_calc_rect_view_scale -- needs more investigation], but instead of breaking it for Light, Image and Compositor Backdrop, lets just compensate by scaling the Camera Border Gizmo for now. Maniphest Tasks: T74278 Differential Revision: https://developer.blender.org/D6991
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-08-26Gizmo: match the DOF gizmo size with the non-gizmo indicatorCampbell Barton
2019-08-26Fix T69153: Camera DOF gizmo failsCampbell Barton
Regression from bc3139d792268
2019-07-31Refactor access to dependency graphSergey Sharybin
This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-06-07Keymap: gizmos now use a map that optionally activates on pressCampbell Barton
The legacy keymap now activates on press.
2019-05-30Gizmo: activate some gizmos on drag instead of pressCampbell Barton
Use drag-only keyamp to adjust gizmos which use drag motion to change a value. By default gizmos still activate on press. This allows for left click select to be used with transform without the gizmos getting in the way. Even though this isn't necessary for right click select it allows click events to pass through and be used by tools which can be useful. Resolves T63996
2019-05-17Cycles/Eevee: unify depth of field settings for camerasJeroen Bakker
There is now a checkbox to enable/disable depth of field per camera. For Eevee this replace the scene level setting. For Cycles there is now only an F-Stop value, no longer a Radius. Existing files are converted based on Cycles or Eevee being set in the scene. Differential Revision: https://developer.blender.org/D4882
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-14Gizmo: individual toggles for 3D view gizmosCampbell Barton
The popover for displaying gizmos now has options for empty, light & camera gizmos. Transform toggles are now checkboxes, which has the advantage that it's more obvious they can be mixed however changing from one to another now uses 3x clicks instead of a single click-drag action. We might need a faster way to switch between transform types.
2019-04-133D View: move gizmo draw options out of overlaysCampbell Barton
Gizmo's now have their own popover in preparation for making transform gizmos accessible without having to use tools See: T63518
2019-03-26Cleanup: style, use braces for editor/spacesCampbell Barton
2019-03-23Fix auto sensor size for camera gizmoCampbell Barton
2019-03-05Cleanup: rename RENDER_OVERRIDE -> HIDE_OVERLAYSCampbell Barton
Match the UI naming (changed since 2.7x).
2019-02-18DNA: rename Object.size -> scaleCampbell Barton
Resolves a common cause of confusion.
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-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: blank lines over doxy headersCampbell Barton
2019-01-17T60560: Render border gizmo doesn't update displayCampbell Barton
2019-01-07Cleanup: add trailing commas to structsCampbell Barton
2019-01-03Fix some inconsistencies in object visibility/selectability tests.Brecht Van Lommel
2019-01-03Fix T60107: gizmos should not show for unselectable objects.Brecht Van Lommel
2018-12-18Fix gizmos showing for non-visible objectsCampbell Barton
Active object gizmos were showing even when the object wasn't visible (local view or with their object type disabled).
2018-12-11DNA: version patch Camera.drawsize to twice it's valueCampbell Barton
Draw size represented half the actual size used.
2018-12-11Gizmo: update camera ortho-sizeCampbell Barton
This needs to be improved further, for now it shows in the right location.
2018-12-03Fix camera lens gizmo sensor comparisonCampbell Barton
2018-12-01Fix camera gizmo sensor checkCampbell Barton
Also correct wrong but harmless assignment.
2018-09-06UI / Python: rename X-Ray to In Front, Draw to Display.Brecht Van Lommel
See T56648.
2018-07-15Cleanup: use variable names based on term gizmoCampbell Barton
2018-07-15WM: rename manipulator to gizmo internallyCampbell Barton
2018-07-15WM: rename files, manipulator -> gizmoCampbell Barton
Edit doxy files and header guards only.