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-03-31Cleanup: Curves draw cache renaming, use referencesHans Goudey
Also change some remaining cases of "hair object" to "curves object".
2022-03-30UI: Improve node editor dot backgroundLeon Schittek
This commit makes the dot grid used as background in the node editor more visually stable when zooming in and out. The dot grid now uses a continuously subdividing pattern, where each level of subdivision divides the previous five times, similar to the line grid in the 3D viewport. The maximum for the "Grid Levels" theme setting is changed to 3, since any further subdivisions are too small to be visible. The "Grid Levels" value for the default themes "Blender Dark" and "Blender Light" is therefore changed to 3, as well. Reviewed By: Hans Goudey, Pablo Vazquez Differential Revision: http://developer.blender.org/D13302
2022-03-30GPencil: Fix double-free issue in update cacheFalk David
When a `GPencilUpdateCacheNode` is created, it always allocates the `children` pointer. This should not be freed until the whole cache is deleted. The `cache_node_update` would free the `children` pointer in a specific case, causing a double-free later when the cache was removed.
2022-03-30Iterator to loop over objects based on a flagDalai Felinto
2022-03-30Fix: Failing curves test after recent commitHans Goudey
87e9451d660e8288d missed updating the behavior for Catmull Rom curves.
2022-03-30Curves: Port parameter node to the new data-blockHans Goudey
Using the evaluated lengths cache from 72d25fa41d8c575, re-implement the curve parameter node with the new data structure. Conceptually it works the same way, but the code is restructured and cleaned up a bit as well. This also adds support for Catmull Rom curves. Differential Revision: https://developer.blender.org/D14461
2022-03-30Fix: Remove special case from curve segment size functionHans Goudey
The idea that curves with two points cannot be cyclic came from some existing code, but there's not fundamental reason for it, so remove the check in this function. The case can be handled elsewhere if necessary.
2022-03-30Curves: Add length cache, length paramerterize utilityHans Goudey
This commit adds calculation of lengths along the curve for each evaluated point. This is used for sampling, resampling, the "curve parameter" node, and potentially more places in the future. This commit also includes a utility for calculation of uniform samples in blenlib. It can find evenlyspaced samples along a sequence of points and use linear interpolation to move data from those points to the samples. Making the utility more general aligns better with the more functional approach of the new curves code and makes the behavior available elsewhere. A "color math" header is added to allow very basic interpolation between two colors in the `blender::math` namespace. Differential Revision: https://developer.blender.org/D14382
2022-03-30Cleanup: spelling in commentsCampbell Barton
2022-03-30Cleanup: unbalanced doxy sectionsCampbell Barton
2022-03-29Fix: incorrect assert in new codeHans Goudey
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-29LibOverride: Rename 'delete hierarchy' to 'clear hierarchy', add 'clear ↵Bastien Montagne
single' operations. 'Delete' was a confusing name, even though it would delete the overrides it would replace them by linked data. Adding the 'single' version of that operation made it even more confusing, since often it has to keep the override ID for sakes of hierarchy, and just reset it and turn it back into a non-editable system override. Ref: {T95707}.
2022-03-29LibOverride: Add initial handling of system overrides in ↵Bastien Montagne
creation/duplication/resync code, and some basic do_version. When creating with hierarchies, core code only generates system overrides, responsibility to define 'user overrides' is then for the higher-level calling code (Editor/Operator-level). do_version code uses fairly basic euristics, should be good enough here though in most cases. and can always be refined later if needed. Ref: {T95707}.
2022-03-29LibOverride: Add initial System Override flag.Bastien Montagne
This merely adds the flag, exposes it in RMA, and uses it in some of the most common 'is editable' checks (RNA, `BASE_EDITABLE` macro...). Next step: do_version and defining systemoverrides at creation. Ref: {T95707}.
2022-03-29Cover DNA_gpencil_types.h with C++ structure methodsSergey Sharybin
Ref T96847 Maniphest Tasks: T96847 Differential Revision: https://developer.blender.org/D14487
2022-03-29Cleanup: Remove legacy dupli system from point cloud objectHans Goudey
The "dupli" system now has a faster, more powerful, and more flexible alternative with geometry nodes. Since the point cloud objects haven't been exposed in the non-experimental UI yet, we can remove the dupli implementation and the panel for the object type. Differential Revision: https://developer.blender.org/D14482
2022-03-29Assets: Support automatic collection previewsJulian Eisel
Adds supports for collection previews that are rendered automatically when collections are marked as assets. (Or when preview rendering is triggered differently, e.g. through the //Refresh Data-Block Previews// operator). Idea in this patch is to create a collection instance empty outside of main for the collection, and then reuse the object rendering code to render the preview. This keeps things very simple and works just fine. Differential Revision: https://developer.blender.org/D14460 Reviewed by: Bastien Montagne
2022-03-29Fix (unreported) LibOverride: re-creation of overrides in consecutive ↵Bastien Montagne
partial overrides of a same hierarchy. If creating partial hierarchy overrides (from the outliner e.g.), that need to create extra overrides, those could be re-created everytime, leading to very bad situation where there would be several overrides of the same reference ID in the same override hierarchy. This fix makes it so that existing overrides in a given hierarchy will always be re-used in case other overrides are added to the hierarchy.
2022-03-29Cleanup: Use higher level semantic for zeroing DNA objects in C++Sergey Sharybin
Replaces old-style memzero-style of call with zero-initializer. Allows to shorten typical initialization code to a single line: Object foo = blender::dna::shallow_zero_initialize<Object>() This will allow to more easily convert designated initializer which is often used to fill object with zeroes to the explicit function calls: MyDNAStruct foo = {}; will be translated to MyDNAStruct foo = blender::dna::shallow_zero_initialize<MyDNAStruct>(); Differential Revision: https://developer.blender.org/D14486
2022-03-29Cleanup: Remove redundant DNA C++ helper functionSergey Sharybin
Use shallow_copy, no need in copy_memory. The latter appeared as some last minute solution for a compilation warning on Friday.
2022-03-28Cleanup: Move scene.c to C++Hans Goudey
This is meant to allow using C++ data structures in this file as a performance improvement. Particularly `Vector` instead of `ListBase` for `duplilist`. This change builds and passes tests on all platforms on the buildbot.
2022-03-28Fix various UI messages issues.Bastien Montagne
2022-03-28Fix (unreported) crash in some mesh-from-object code.Bastien Montagne
Crashed e.g. FBX exporter. Mistake in rB0c33e84020deca.
2022-03-28Cleanup: use "num" as a suffix in: source/blender/modifiersCampbell Barton
Also rename DNA struct members.
2022-03-28Cleanup: Reduce duplication to prepare for UDIM packingJesse Yurkovich
In preparation for supporting packing of UDIM tiled textures, this patch refactors a small portion of image.cc. The refactor should lead to less duplicate code now and when Tiled images are added in the near future. This patch is based on the prior work done for D6492 where it was requested this part be split and can be summarized as follows: - `load_sequence_single` is removed and merged with `load_image_single` - `image_load_sequence_file` is removed and merged with `image_load_image_file` Reviewed By: lukasstockner97 Differential Revision: https://developer.blender.org/D14327
2022-03-27Cleanup: Remove frameserver cmake definitionAaron Carlisle
Left over from rBaab5ac25f2c2e6fbc50f9fb352e71ef0ae0ba2f1
2022-03-25Cleanup: Add asserts, remove default caseHans Goudey
2022-03-25Curves: Bezier and general interpolate to evaluated utilityHans Goudey
This commit implements generic evaluation for Bezier curves (which is really just linear interpolation, since attributes are not stored on Bezier handles). For complete parity with the old curve type, we would have to add options for this (RNA: `Spline.radius_interpolation`), but it's not clear that we want to do that. This also adds a generic `interpolate_to_evaluate` utility on curves that hides the implementation details. Though there is theoretically a performance cost to that, without some abstraction calling code would usually be too complex. Differential Revision: https://developer.blender.org/D14447
2022-03-25Curves: Add a utility to count curves of each typeHans Goudey
This commit adds a utility that returns an array with the number of curves of every type. One use case for this is detecting whether to remove handle or NURBS attributes when changing curve types. It's best to avoid using this when it's not necessary, but sometimes it can't really be avoided, and having a utility at least makes using an optimized version simple. In the future, this information can be cached in the curves runtime. Differential Revision: https://developer.blender.org/D14448
2022-03-25GPencil: Improve smooth operationHenrik Dick
This patch makes the grease pencil smooth operation symmetric. It also increases the performance a lot if strong smoothing is required. Additionally there is an option for the position smooth operation to keep the shape closer to the original for more iterations. Since the result differs from the previous algorithm, versioning is used to change the iterations and factor to match the old result. Differential Revision: http://developer.blender.org/D14325
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-25LibOverride: Prevent some more potential modification of overridden collections.Bastien Montagne
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: use doxy sections for customdata.ccCampbell Barton
2022-03-25Fix: Small fixes for NURBS evaluationHans Goudey
Clear the nurbs basis cache dirty flag when its evaluation finishes. Remove an incorrect assert that the evaluated size couldn't be zero. It can, when `check_valid_size_and_order` returns false.
2022-03-25Cleanup: Use more specific variable nameHans Goudey
2022-03-25Curves: Tweak evaluated offset functionsHans Goudey
Add a function to retrieve the points for an index range of curves, and move "ensuring" the offsets to a separate function, since it's often nicer to call that if you don't need the result span immediately.
2022-03-25Cleanup: Further renaming in new curves codeHans Goudey
A follow-up to e253f9f66d6f. Follow the policy from T85728 completely (using "num" as a prefix) and rename another function.
2022-03-25Cleanup: remove argument to doxygen \fileCampbell Barton
Doxygen doesn't require this to be set.
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: use count or num instead of nbrCampbell Barton
Follow conventions from T85728.
2022-03-25Cleanup: spelling in comments, stringsCampbell Barton
2022-03-25Cleanup: sort cmake file listsCampbell Barton
2022-03-25ImBuf: Add support for WebP image formatAaron Carlisle
Currently only supports single image frames (no animation possible). If quality slider is set to 100 then lossless compression will be used, otherwise lossy compression is used. Gives about 35% reduction of filesize save when re-saving splash screens with lossless compression. Also saves much faster, up to 15x faster than PNG with a better compression ratio as a plus. Note, this is currently left disabled until we have WebP libs (see T95206) For testing precompiled libs can be downloaded from Google: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html Differential Revision: https://developer.blender.org/D1598
2022-03-24Fix T96756: Blender hanges on rendering after file save, after recent changesBrecht Van Lommel
2022-03-24Correct syntax error for MSVCCampbell Barton