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-09-18Build: fix gtest build flags affecting actual libraryBrecht Van Lommel
Switch to target_ functions to avoid this.
2022-09-15UV: rename "Pixel Snap Mode" to "Pixel Round Mode"Chris Blackbourn
Maniphest Tasks: T78391 Differential Revision: https://developer.blender.org/D15952
2022-09-13Fix: Resolve deprecation warning when copying polygon structHans Goudey
`MPoly` is used and copied in many places. To avoid the need to use a special function for copying MPoly, or the need to add a copy constructor, just rename the `mat_nr` field to include "legacy" in the name. This keeps the original purpose of notifying developers that the field shouldn't be used without any further complexity. Apply the same fix to `bweight`. Differential Revision: https://developer.blender.org/D15841
2022-09-07Cleanup: spelling in comments, correct doxy slashes, replace '/w'Campbell Barton
2022-08-31Nodes: move NodeTreeRef functionality into node runtime dataJacques Lucke
The purpose of `NodeTreeRef` was to speed up various queries on a read-only `bNodeTree`. Not that we have runtime data in nodes and sockets, we can also store the result of some queries there. This has some benefits: * No need for a read-only separate node tree data structure which increased complexity. * Makes it easier to reuse cached queries in more parts of Blender that can benefit from it. A downside is that we loose some type safety that we got by having different types for input and output sockets, as well as internal and non-internal links. This patch also refactors `DerivedNodeTree` so that it does not use `NodeTreeRef` anymore, but uses `bNodeTree` directly instead. To provide a convenient API (that is also close to what `NodeTreeRef` has), a new approach is implemented: `bNodeTree`, `bNode`, `bNodeSocket` and `bNodeLink` now have C++ methods declared in `DNA_node_types.h` which are implemented in `BKE_node_runtime.hh`. To make this work, `makesdna` now skips c++ sections when parsing dna header files. No user visible changes are expected. Differential Revision: https://developer.blender.org/D15491
2022-08-18CMake: support building with musl libclistout
Instead of using macros like GLIBC we can use the CMake build systems internal functions to check if some header or functions are present on the running system's libc. Add ./build_files/cmake/have_features.cmake to add checks for platform features which can be used to set defines for source files that require them. Reviewed By: campbellbarton Ref D15696
2022-05-19Cleanup: spelling in comments & move doc-strings to headersCampbell Barton
2022-05-19makesdna: centralize DNA header list.Ray Molenkamp
There's currently 4 places that need to be edited when adding a DNA header, and as you can imagine, this has gotten out of sync quite a bit. source/blender/CMakeLists.txt - 84 headers source/blender/makesdna/intern/CMakeLists.txt - 33 headers source/blender/makesdna/intern/makesdna.c@includefiles - 77 headers source/blender/makesdna/intern/makesdna.c@Disabletypes - 76 headers This diff makes source/blender/CMakeLists.txt the only place where we need to keep track of dna headers, less maintenance less mistakes. For all old places there is now a comment reminding people of the new location. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D13048
2022-05-17Cleanup: use term 'filepath' for full file pathsCampbell Barton
2022-05-11Cleanup: use '_num' suffix instead of '_size' for CurveGeometryCampbell Barton
Follow conventions from T85728.
2022-05-04Cleanup: More clear name in surface deform modifierSergey Sharybin
Make it explicit that counter is about target mesh. Use DNA rename for it so that the files stay compatible. Also renamed some purely runtime fields to replace `t` prefix with `target` as the short `t` is super easy to miss. Differential Revision: https://developer.blender.org/D14835
2022-03-28Cleanup: use "num" as a suffix in: source/blender/modifiersCampbell Barton
Also rename DNA struct members.
2022-03-28Cleanup: use "num" as a suffix in: source/blender/nodesCampbell Barton
2022-03-25Fix compilation warnings after previous changeSergey Sharybin
Thanks Jacques for finding solution for deprecation warning which was generated by GCC for constructor. The rest of the change is related on fixing memaccess warning which was happening when memset/memcpy was used directly on the DNA object pointer. Now there are two utility functions for this: - blender::dna::zero_memory - blender::dna::copy_memory
2022-03-25Implement C++ methods for DNA structuresSergey Sharybin
This change makes it possible to add implementation of common C++ methods for DNA structures which helps ensuring unsafe operations like shallow copy are done explicitly. For example, creating a shallow copy used to be: Object temp_object = *input_object; In the C++ context it was seen like the temp_object is properly decoupled from the input object, while in the reality is it not. Now this code becomes: Object temp_object = blender::dna::shallow_copy(*input_object); The copy and move constructor and assignment operators are now explicitly disabled. Other than a more explicit resource management this change also solves a lot of warnings generated by the implicitly defined copy constructors w.r.t dealing with deprecated fields. These warnings were generated by Apple Clang when a shallow object copy was created via implicitly defined copy constructor. In order to enable C++ methods for DNA structures a newly added macro `DNA_DEFINE_CXX_METHODS()` is to be used: tpyedef struct Object { DNA_DEFINE_CXX_METHODS(Object) ... } Object; For the shallow copy use `blender::dna::shallow_copy()`. The implementation of the memcpy is hidden via an internal DNA function to avoid pulling `string.h` into every DNA header. This means that the solution does not affect on the headers dependencies. --- Ideally `DNA_shallow_copy` would be defined in a more explicit header, but don;t think we have a suitable one already. Maybe we can introduce `DNA_access.h` ? Differential Revision: https://developer.blender.org/D14427
2022-03-25Revert "Implement C++ methods for DNA structures"Sergey Sharybin
This reverts commit 8c44793228750537c08ea7b19fc18df0138f9501. Apparently, this generated a lot of warnings in GCC. Didn't find a quick solution and is it not something I want to be trading between (more quiet Clang in an expense of less quiet GCC). Will re-iterate on the patch are re-commit it.
2022-03-25Implement C++ methods for DNA structuresSergey Sharybin
This change makes it possible to add implementation of common C++ methods for DNA structures which helps ensuring unsafe operations like shallow copy are done explicitly. For example, creating a shallow copy used to be: Object temp_object = *input_object; In the C++ context it was seen like the temp_object is properly decoupled from the input object, while in the reality is it not. Now this code becomes: Object temp_object = blender::dna::shallow_copy(*input_object); The copy and move constructor and assignment operators are now explicitly disabled. Other than a more explicit resource management this change also solves a lot of warnings generated by the implicitly defined copy constructors w.r.t dealing with deprecated fields. These warnings were generated by Apple Clang when a shallow object copy was created via implicitly defined copy constructor. In order to enable C++ methods for DNA structures a newly added macro `DNA_DEFINE_CXX_METHODS()` is to be used: tpyedef struct Object { DNA_DEFINE_CXX_METHODS(Object) ... } Object; For the shallow copy use `blender::dna::shallow_copy()`. The implementation of the memcpy is hidden via an internal DNA function to avoid pulling `string.h` into every DNA header. This means that the solution does not affect on the headers dependencies. --- Ideally `DNA_shallow_copy` would be defined in a more explicit header, but don;t think we have a suitable one already. Maybe we can introduce `DNA_access.h` ? Differential Revision: https://developer.blender.org/D14427
2022-03-25Cleanup: rename CustomDataExternal.filename => filepathCampbell Barton
Reserve "filename" when only the name component is used.
2022-03-25Cleanup: rename ParticleSettings.child_nbr => child_percentCampbell Barton
child_nbr was used as a percentage as well as the final number of particles. Rename to avoid confusion.
2022-03-25Cleanup: sort cmake file listsCampbell Barton
2022-03-24GPencil: New Envelope ModifierHenrik Dick
This new modifier creates a shape known as envelope. It connects all points that are n points apart. There is also a mode which fits a single stroke to the envelope shape that is determined by that rule. For more details, refer to the patch. Reviewed By: NicksBest, antoniov, frogstomp, mendio Differential Revision: http://developer.blender.org/D14341
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
2022-02-09Cleanup: make file headers more consistentCampbell Barton
Also some descriptive text into doc-strings.
2022-02-09Cleanup: move file descriptions into doxygen file sectionCampbell Barton
Continuation of 19100aa57d847699d17527b76c2fab1f4ab88885.
2022-02-08Cleanup: simplify DNA genfile castingCampbell Barton
Avoid using the uint64_t as an intermediate cast since it complicates behavior for signed types (which first need to be cast to an int64_t). Assign both old_value_i & old_value_f from the original value to avoid the need for different handling of signed/unsigned types. Reviewed By: JacquesLucke Ref D14039
2022-02-08Cleanup: clang-formatCampbell Barton
2022-02-08Fix dna_genfile error converting signed int types to floating pointCampbell Barton
Regression in 51befa4108128a7bacf7a201046cf7ede999833a caused negative values to overflow into a uint64_t. Resolve by casting to a signed int from originally signed types. This caused D14033 not to work properly.
2022-02-08Cleanup: use an intermediate value for cast_primitive_typeCampbell Barton
Assign the actual value before casting to large uint64_t/double types. This improves readability, especially in cases where both pointer and integer casts were used in one expression, to make matters worse clang-format treated these casts as a multiplication. This also made debugging/printing the values more of a hassle. No functional changes (GCC produced identical output).
2022-02-07Curves: Rename "Hair" types, variables, and functions to "Curves"Hans Goudey
Based on discussions from T95355 and T94193, the plan is to use the name "Curves" to describe the data-block container for multiple curves. Eventually this will replace the existing "Curve" data-block. However, it will be a while before the curve data-block can be replaced so in order to distinguish the two curve types in the UI, "Hair Curves" will be used, but eventually changed back to "Curves". This patch renames "hair-related" files, functions, types, and variable names to this convention. A deep rename is preferred to keep code consistent and to avoid any "hair" terminology from leaking, since the new data-block is meant for all curve types, not just hair use cases. The downside of this naming is that the difference between "Curve" and "Curves" has become important. That was considered during design discussons and deemed acceptable, especially given the non-permanent nature of the somewhat common conflict. Some points of interest: - All DNA compatibility is lost, just like rBf59767ff9729. - I renamed `ID_HA` to `ID_CV` so there is no complete mismatch. - `hair_curves` is used where necessary to distinguish from the existing "curves" plural. - I didn't rename any of the cycles/rendering code function names, since that is also used by the old hair particle system. Differential Revision: https://developer.blender.org/D14007
2022-02-04Fix T93425: makesdna crashes during build with LTO on s390x LinuxCampbell Barton
DNAstr was assumed to be 4-byte aligned which is not necessarily the case for byte-arrays. Use a compiler attribute to ensure this is the case. Thanks to @mtasaka for investigating and providing a patch.
2022-01-17Baking: new method to generate margin, based on adjacent facesMartijn Versteegh
This significantly reduces discontinuities on UV seams, by giving a better match of the texture filtered colors on both sides of the seam. It works by using pixels from adjacent faces across the UV seam. This new option is called "Adjacent Faces" and is the default. The old option is called "Extend", and extends border pixels outwards. Differential Revision: https://developer.blender.org/D13303
2022-01-12Fix warnings after bab47b60cb69Julian Eisel
It's not really clear how this part of the defaults code should be used, I think this is fine now and solves the warnings.
2022-01-12DNA: Add space clip editor defaultsSimon Lenz
This is my attempt of adding defaults for the space clip editor struct (in line with https://developer.blender.org/T80164). It adds the default allocation for `SpaceClip` and `node_composite_movieclip.cc`. This also solves the error below (for C++ files using the DNA_default_alloc), which was put forward by Sergey Sharybin. Differential Revision: https://developer.blender.org/D13367 Reviewed by: Julian Eisel
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.
2022-01-06Cleanup: spelling in commentsCampbell Barton
2021-12-20Docs: use doxygen formatting for DNACampbell Barton
Differentiate doc-strings from title/section text. Also use explicit doxygen references to struct members so it's not ambiguous which member is being referenced. Note that these changes aren't complete (some files weren't touched).
2021-12-14Cleanup: clang-formatCampbell Barton
2021-12-13GPencil: New Shrinkwrap modifierAntonio Vazquez
his new modifier is equals to the existing mesh modifier but adapted to grease pencil. The underlying functions used to calculate the shrink are the same used in meshes. {F11794101} Reviewed By: pepeland, HooglyBoogly Differential Revision: https://developer.blender.org/D13192
2021-12-13Cleanup: use "filepath" term for Main, BlendFileData & FileGlobalCampbell Barton
Use "filepath" which is the current convention for naming full paths. - Main use "name" which isn't obviously a file path. - BlendFileData & FileGlobal used "filename" which is often used for the name component of a path (without the directory).
2021-12-08Cleanup: move public doc-strings into headers for 'makesdna'Campbell Barton
Ref T92709
2021-12-07Cleanup: sort DNA renamingCampbell Barton
Add note at the beginning & end so it's not overlooked.
2021-12-02Cleanup: Rename curve struct fieldsHans Goudey
These existing names were unhelpful at best, actively confusing at worst. This patch renames them to be consistent with the terms used to refer to the values in the UI. - `width` -> `offset` - `ext1` -> `extrude` - `ext2` -> `bevel_radius` Differential Revision: https://developer.blender.org/D9627
2021-12-01Cleanup: Use int8 type rather than char for bufferJulian Eisel
Indicates that this is just a buffer with an element size of 8 bit, not a displayable/printable string buffer.
2021-10-20Cleanup: use elem macrosCampbell Barton
2021-10-18Cleanup: internal sequencer naming for overlaysCampbell Barton
- Rename RNA SpaceSeq.show_strip_overlay to show_overlays matching the 3D View, the term "strip" was misleading as this is used for the preview as well. - Rename various RNA overlay settings to overlay_frame since "Frame Offset" is a specific feature, avoid having both Editor.show_overlay and SpaceSeq.show_overlays. - Rename Editing `over_*` -> `overlay_frame_*` in DNA, as well as flags.
2021-10-18Cleanup: spelling in commentsCampbell Barton
2021-10-14Cleanup: remove historic reference from makesdna.cCampbell Barton
We have mostly removed information about original authors, as this information isn't so useful.
2021-10-14Cleanup: pass the sizeof(..) as the second arg for array allocationCampbell Barton
By argument naming and convention this is the intended argument order.
2021-09-22GPencil: Split Weight modifier in two to make more consistentAntonio Vazquez
The old modifier had two modes, but it is better to keep separated as meshes. The UI has changed to be more consistent, including a new column type of modifiers. Note: The logic has not changed with the previous version of the modifier, just is a split on two modifiers.. Reviewed By: mendio, pablovazquez Differential Revision: https://developer.blender.org/D12586
2021-09-18Cleanup: typoJacques Lucke