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
path: root/source
AgeCommit message (Collapse)Author
2022-09-09Cleanup: format, trailing spaceCampbell Barton
2022-09-09Cleanup: spelling in commentsCampbell Barton
2022-09-09Python: change bpy.app.binary_path behavior WITH_PYTHON_MODULECampbell Barton
The following changes have been made to this attribute with WITH_PYTHON_MODULE is defined: - Defaults to an empty string (instead of pointing to __init__.so). - It's writable, so script authors can point to a valid Blender binary. `where_am_i(..)` is no longer used by BKE_appdir_program_path_init, there is now a separate code-path for setting the initial program directory, calls after this can be used to set the binary path.
2022-09-09Cleanup: quiet conversion warningCampbell Barton
2022-09-09Cleanup: cmake line length, wrappingCampbell Barton
2022-09-09CMake: exclude Python libs & batch scripts WITH_PYTHON_MODULE for WIN32Campbell Barton
2022-09-09Cleanup: check for Python module in BKE_appdir_program_path_initCampbell Barton
Replace the argument with an in ifdef in BKE_appdir_program_path_init. At the time `blenkernel` didn't define WITH_PYTHON_MODULE, since it does now there is no need for an argument. With the minor benefit of fewer preprocessor checks in the main() function.
2022-09-09Cleanup: comments, spelling, line length for creator's CMake fileCampbell Barton
2022-09-09Python: install "bpy" as a package WITH_PYTHON_MODULECampbell Barton
Building WITH_PYTHON_MODULE was creating a "bpy" module that required Blenders data-files to be located in the module search path too. This mean that a typical installation on Linux would create: - `/usr/lib/python3.10/site-packages/bpy.so` - `/usr/lib/python3.10/site-packages/3.4` (containing `scripts` & `datafiles`). The new behavior creates: - `/usr/lib/python3.10/site-packages/bpy/__init__.so` - `/usr/lib/python3.10/site-packages/bpy/3.4` With the advantage that the "bpy" directory is the self contained Python module. No changes are needed for the module loading logic as the mechanism to swap in blend internal Python "bpy" module (defined in `release/scripts/modules/bpy/__init__.py`) works the same in both instances. Thanks to Brecht for macOS support. Reviewed by brecht Ref D15911
2022-09-09Fix T100521: Nodes added with link drag search not added to frameDominik Fill
Use macro NODE_OT_translate_attach for attaching node created through link-drag-search to frame, as suggested by Leon Schittek (@lone_noel) in D15888. Differential Revision: https://developer.blender.org/D15920
2022-09-08WIP: Adding const Scene* to many areas.Jeroen Bakker
2022-09-08Silence warnings/assert about invalid embedded IDs for older blendfiles.Bastien Montagne
there is no point in warning about files that are not supposed to be 'correct' in that regard.
2022-09-08Fix: link drag search feature only works forgeometry nodes groupsHans Goudey
The node tree used to detect if the tree was a node group wasn't the last in the node editor's path like it should be, so the search thought that all shader node groups weren't node groups.
2022-09-08Fix: Integer type in linear probing strategyHans Goudey
Probing strategies must iterate over every possible hash, but the linear strategy only did 2^32 iterations, not 2^64. Updating this was missed in 8cbbdedaf4dfec9e3. Also fix an unnecessary comma. Differential Revision: https://developer.blender.org/D15913
2022-09-08Cleanup: Remove unused face customdata for merging meshesHans Goudey
2022-09-08Cleanup: Remove redundant vertex duplication in extrude nodeHans Goudey
Now this is done by `Mesh::verts_for_write()`
2022-09-08Cleanup: Remove unused variable in RNA path functionJulian Eisel
Caused by 462014b59b4f
2022-09-08Outliner: Hide "data operations" context menu entries unless supportedJulian Eisel
The context menu would always show a section with "Select", "Deselect", "Hide", "Unhide" and "Select Linked" if there were no more specific operators to show (e.g. modifier operations). For many tree elements they did not make sense and simply would do nothing. Only show the section for supported types.
2022-09-08Cleanup: Simplify outliner context menu building queriesJulian Eisel
- Remove unnecessary calls to `get_element_operation_type()` (result wasn't used). - Remove branches/checks for cases that couldn't possibly happen. (assert instead). - Ensure all return arguments are set so caller can't make the mistake of forgetting that. - Early exit instead of big `if` block. - Use `const`.
2022-09-08IDManagement: change `IDTypeInfo.owner_get` to instead return address of the ↵Bastien Montagne
owner_id pointer. Also rename the callback. That way, we can keep moving toward a more generic handling of those embedded IDs (think e.g. about copy code).
2022-09-08IDManagement: Add new `BKE_id_owner_get` accessor.Bastien Montagne
Essentially calls `IDTypeInfo->owner_get` for now, will make more sense once the callback is changed to return the address of the pointer instead.
2022-09-08Cleanup: make meaning of base visibility flags more clearBrecht Van Lommel
Rename, add comments, and use flag in the depsgraph to ensure the logic matches. Differential Revision: https://developer.blender.org/D15883
2022-09-08Nodes: fix handling cyclic node treesJacques Lucke
2022-09-08Fix Blender as a Python module for WIN32Campbell Barton
BKE_appdir_program_path_init would override the module path extracted from the Python module, replacing it with the Python executable. This caused the data files not to be found and the module not to load.
2022-09-08Console: Support page up/down and home keys for scrollingJulian Eisel
- Page up/down scrolls up/down an entire page - Home resets the scrolling back to the bottom. The fact that these were missing was probably an oversight. Other similar editors have them. This works by including the "View2D Buttons List" keymap for the console, which the other similar editors use as well.
2022-09-08Fix T100887: Some C++ importers/exporters (e.g. OBJ) reset file dialog Sort ↵Aras Pranckevicius
By mode A couple years ago D8598 made it so that C++ operators generally should use "default" sort mode, which remembers previously used sort setting. Back then all the places that needed it got changed to use this "default" one, but since then some more IO code landed, where seemingly by accident it used "sort by file name": - USD importer, - Grease Pencil exporter, - OBJ importer & exporter, - STL importer. Reviewed By: Julian Eisel Differential Revision: https://developer.blender.org/D15906
2022-09-08Fix T96297: obj: improve layout of UI fields and axis validationAras Pranckevicius
Implement ideas from T96297: - Fix "invalid axis settings" (both forward & up along the same direction) validation: now similar to the Python based code, when invalid axis is applied, the other axis is changed to not conflict. - Make axis enums be expanded inside the row, similar to Collada UI. - Move "selected only" near the top, similar to how it's in Collada, USD, FBX and glTF export UIs. - Move animation export options to the bottom.
2022-09-08Fix T100822: Merging objects does not assign materials correctlyPhilipp Oeser
Caused by {rBf1c0249f34c4} This is what (I think) went wrong in the above commit: - `join_mesh_single` was writing material indices to the custom data / attribute of the source mesh - the `polyofs` of each mesh that was joined was not taken into account Now, instead of using the AttributeWriter on a particular mesh, use the CustomData (`pdata`) - that is constantly changed during joining - directly for writing. Otherwise we end up writing into customdata that has not been "extended" yet (even if we use the destination mesh). Also note that even on the destination mesh, CustomData would be freed anyways after all calls to `join_mesh_single` took place, to be replaced with the mentioned `pdata` which should be the single customdata to write to here. When doing this (writing to `pdata`), we also need to take into account the poly offset of each contributing mesh. Maniphest Tasks: T100822 Differential Revision: https://developer.blender.org/D15878
2022-09-08Cleanup: correct PyModuleDef.m_slots referenceCampbell Barton
Changed in Python 3.5, match Python's internal name.
2022-09-08Python: ensure the runtime version is compatible WITH_PYTHON_MODULECampbell Barton
When Blender is built as a Python module, exit early if the major and minor versions don't match. Without this, the error message can be cryptic/unhelpful.
2022-09-08Fix: Spreadsheet row filters unimplemented for boolean typeHans Goudey
This was lost in 474adc6f883c2d5a85
2022-09-08Cleanup: Use C++ methods to retrieve attribute accessorsHans Goudey
Replace `mesh_attributes`, `mesh_attributes_for_write` and the point cloud versions with methods on the `Mesh` and `PointCloud` types. This makes them friendlier to use and improves readability. Differential Revision: https://developer.blender.org/D15907
2022-09-08Cleanup: remove ED_types.h & ACTIVE, DESELECT definitionsCampbell Barton
- ACTIVE flag is no longer in use. - DESELECT was used in some places as an alias for false, even though this could arguably help readability, in practice this was often passed with a selection flag leading to confusing calls such as `select_beztriple(bezt, DESELECT, SELECT, HIDDEN)`. Replace SELECT/DESELECT with true/false in these cases. - Remove ED_types.h. Add a 'SELECT' definition to DNA_anim_types.h, for fcurve_test, we could use a shared DNA header, or remove use of the define entirely in favor of typed enums.
2022-09-08Cleanup: prefer terms verts/polys over vertices/polygonsCampbell Barton
Follows existing naming for the most part, also use "num" as a suffix in some instances (following our naming conventions).
2022-09-08Cleanup: Removed handling of unused flag in TimeMarkersColin Basnett
This removes the defunct handling of the ACTIVE flag in TimeMarker::flags. It's not possible for that flag to be set though normal operation. Differential Revision: https://developer.blender.org/D15828
2022-09-07Fix T100863, T100875: Vertex group reading broken for recent filesHans Goudey
This patch consists of two related fixes. The first is a simple fix for forward compatibility, setting the Mesh.dvert pointer when writing a file allows old Blender versions to read vertex groups from newly saved files. The second part is a bit uglier and more complex. Normally mesh vertex group data is read in mesh_blend_read_data, for backward compatibility with very old files. However, after 05952aa94d33eeb50 the mesh.dvert pointer was not set, so the data was not read. Reading vertex group layers when reading custom data is enough to fix that issue. We need to read the data from *both* places, but BKE_defvert_blend_read cannot run twice without memory leaks, so first try reading from custom data, then read the pointer if that fails. Differential Revision: https://developer.blender.org/D15905
2022-09-07UI: Small Adjustments to Event IconsHarley Acheson
Minor adjustments to event icons required after recent font changes. See D15582 for more details and examples. Differential Revision: https://developer.blender.org/D15582 Reviewed by Brecht Van Lommel
2022-09-07Fix T100669: OBJ exporter does not properly export image sequence texture namesAras Pranckevicius
When exporting OBJ/MTL animation, texture file paths of image sequences were not adjusted to contain the correct frame number. Fixes T100669. Also, the OBJ exporter was wrongly writing to the same .mtl file for each exported frame, which is a regression compared to the legacy Python exporter.
2022-09-07DRW: update test 'draw_pass_all_commands'Germano Cavalcante
It was incorrectly updated in rBc226c480079fc07e3784f673b1bac4a774fe7937
2022-09-07DRW: fix 'bind_texture' being called in place of 'bind_image'Germano Cavalcante
Error pointed out by tests.
2022-09-07BLI: new C++ BitVector data structureJacques Lucke
This adds a new `blender::BitVector` data structure that was requested a couple of times. It also replaces usages of `BLI_bitmap` in C++ code. See the comment in `BLI_bit_vector.hh` for more details about the advantages and disadvantages of using a bit-vector and how the new data structure compares to `std::vector<bool>` and `BLI_bitmap`. Differential Revision: https://developer.blender.org/D14006
2022-09-07Cleanup: factor out "set default filepath" into a ↵Aras Pranckevicius
ED_fileselect_ensure_default_filepath Follow up to D15904, a bunch of places had exact same logic for "is filepath set? if not, set some default one", so factor all that out into a separate ED_fileselect_ensure_default_filepath function.
2022-09-07Fix T100797: C++ exporters do not remember the path on subsequent exportsAras Pranckevicius
Most/all C++ based IO code had a pattern of doing using RNA_struct_property_is_set to check whether a default path needs to be set. However, it returns false for properties restored from "previous operator settings" (property restoration code sets IDP_FLAG_GHOST flag on them, which "is set" sees and goes "nope, not set"). The fix here is to apply similar logic as 10 years ago in the T32855 fix (rBdb250a4): use RNA_struct_property_is_set_ex instead. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D15904
2022-09-07IDManagement: Add some assert to ensure lib consistency in embedded IDs.Bastien Montagne
From re-checking related code, it seems that we already always ensure consistency of the `lib` pointer between embedded IDs and their owners. This commit only adds some asserts in ambedded ID read code to double-check this.
2022-09-07Geometry Nodes: improve printing geometry set for debuggingJacques Lucke
2022-09-07Cleanup: Remove some references to proxies in comments/log messages.Bastien Montagne
Note that there are still some references to proxies left, in some cases it's unclear if the code related to the comment is even still relevant, this goes beyond mere cleanup to address then.
2022-09-07Nodes: add owner_tree method to nodesJacques Lucke
2022-09-07Fix T100862: only leading deform modifiers used in weight/vertex paint.Alexander Gavrilov
It turns out upon close inspection that the 'deform only' mesh only includes leading deform modifiers, rather than all of them like crazyspace evaluation. This reduces the effect of the change in rB9823a8f72be8 to using the fully evaluated mesh (all modifiers) when the whole stack resulted in no topology change.
2022-09-07Cleanup: comment unused INPUTCHANGE eventCampbell Barton
2022-09-07WM: don't clear modifiers when the window is de-activatedCampbell Barton
Leave the modifiers as they were so comparing with previous modifiers on window re-activation isn't detected as a state change.