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
2021-12-07Cleanup: Fix various source typosluzpaz
This is a continuation of D13462 to clean up source typos. Differential Revision: https://developer.blender.org/D13471
2021-12-07Cleanup: clang formatAaron Carlisle
2021-12-07Shader Nodes: Migrate shader category to new node socket declaration APIAaron Carlisle
No functional changes, tests passed and I double checked the nodes by hand.
2021-12-07Fix: Remove line from common invokeChristoph Lendenfeld
The line that sets the factor_prop in graph_slider_ops.c has been left in the common invoke function by accident. Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D13477 Ref: D13477
2021-12-07Cleanup: renames in graph_slider_opsChristoph Lendenfeld
rename percentage_prop to factor_prop rename remove_ratio to factor remove "graphkeys" prefix from functions Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D13476 Ref: D13476
2021-12-07Cleanup: Use C++ types for multi input socket sortingHans Goudey
The algorithm used is still quite inefficient, but at least the code is easier to read and a little bit simpler now.
2021-12-07Cleanup: Remove unused includesHans Goudey
2021-12-07Cleanup: Remove unused node flagHans Goudey
2021-12-07Cleanup: Remove unnecessary generic includes from headersHans Goudey
2021-12-06Fix: Compile error in field inputHans Goudey
Instead of essentially hashing a bool, just use a ternary operator. Differential Revision: https://developer.blender.org/D13494
2021-12-06macOS: Fix build error in hash functionsAnkit Meel
Remove unneeded recent static_cast attempt. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13492
2021-12-06Shader Nodes: Split each node into own fileAaron Carlisle
This improves both code finding, for example "color ramp" now has its own file. And now each node has its own namespace so function names can be simplified similar to rBfab39440e94 This commit also makes all file names use snake case instead of camel case. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13482
2021-12-06Cleanup: Fix warnings about copied Map loop variablesHans Goudey
The `Map::items()` iterator does not return references.
2021-12-06Fix: Attempt to fix build error on macOSHans Goudey
2021-12-06Nodes: Add function to set compact socket flag for vectorsAaron Carlisle
This flag is currently only used for vector sockets so the function is limited to the vector builder. The flag is only used by two shader nodes at the moment and this is needed to port them over to the new socket declaration API. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13490
2021-12-06Geometry Nodes: reduce code duplication with new GeometyrFieldInputJacques Lucke
Most of our field inputs are currently specific to geometry. This patch introduces a new `GeometryFieldInput` that reduces the overhead of adding new geometry field input. Differential Revision: https://developer.blender.org/D13489
2021-12-06Geometry Nodes: 4 Field Inputs for Mesh Topology DataJohnny Matthews
Creates 4 new nodes which provide topology information for the mesh. Values are interpolated from the primary domain in each case using basic attribute interpolation. Vertex Neighbors - Vertex Count - Face Count Face Neighbors - Vertex Count - Neighboring Face Count Edge Vertices - Vertex Index 1 - Vertex Index 2 - Position 1 - Position 2 Face Area - Face Area Differential Revision: https://developer.blender.org/D13343
2021-12-06Fix T93521: Single point NURBS crash in resample nodeHans Goudey
The resample node didn't handle the case of when a spline didn't have any evaluated points. For poly and Bezier splines we should never hit this case, but it is expected when the number of NURBS control points is smaller than its order, so we have to handle the case here. It's not that obvious what to do in this case, there are a few options: - Remove the bad splines from the result - Generate empty splines for those inputs - Skip resampling the bad splines, copy them to the result - Arbitrarily generate single point splines I chose option three, just skipping the "bad" splines. Since the node already has a selection input, this can be described by just extending that. "Splines with no evaluated points are implicitly deselected." The first option would probably be valid too though. Differential Revision: https://developer.blender.org/D13434
2021-12-06Nodes: Add Shader Socket to new decleration APIAaron Carlisle
This commit adds the shader socket type to the new socket builder api. As a test, this commit also converts the Add Shader node to the new API Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13485
2021-12-06Shader Nodes: Unity BuildAaron Carlisle
- Create a new `bf_nodes_shader` library - Enable unity builds for `bf_nodes_shader`, gives abount a 2.7x speed up for compile times Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13484
2021-12-06Disable asset indexing in the Asset ListSybren A. Stüvel
Asset indexing should be disabled, but this was overlooked in the asset list (used for the pose library in the 3D View).
2021-12-06Asset Indexer: use fixed-length string for ID codeSybren A. Stüvel
Use fixed-length string to convert `char[2]` to `std::string`. Otherwise `strlen()` is called, which is problematic as the `char[2]` is not zero-terminated.
2021-12-06Cleanup: remove unnecessary extern template implementationsJacques Lucke
This technique isn't really necessary anymore, because unity builds avoid instantiating the same template too many times already.
2021-12-06Fix T93314: Thumbnails not drawn with default scaleRichard Antalik
Decrease threshold for drawing thumbnails. This was unintended change in daaa43232d34 that was overlooked.
2021-12-06VSE: Fix strip with mask modifier not blendingRichard Antalik
Set `ibuf->planes` to `R_IMF_PLANES_RGBA` because mask modifier adds transparent areas to image.
2021-12-06Fix T93707: Dragging the tweaked NLA strip causes crashSybren A. Stüvel
Earlier code assumed that the active strip was on the active track. This commit detects when this assumption doesn't hold, and adds a more thorough search of the active strip.
2021-12-06Fix T93611: Curve modifier crash in editmode in certain situationsPhilipp Oeser
Caused by {rB3b6ee8cee708} Above commit was trying to get the vertexgroup from the mesh that is passed into `deformVertsEM` (but that can be NULL). When can it be NULL, when is is non-NULL? `editbmesh_calc_modifiers` only passes in a non-NULL mesh to `deformVertsEM` under certain conditions: - a non-deform-only modifier is handled currently - a non-deform-only modifier preceeds the current modifier - a deform-only modifier preceeds the current modifier (and the current one depends on normals) So the passed-in mesh cannot be relied on, now get the vertex group from the context object data (like it was before the culprit commit). Related commit: rB8f22feefbc20 Maniphest Tasks: T93611 Differential Revision: https://developer.blender.org/D13487
2021-12-06Cleanup: remove some temp dev asserts in new link/append code.Bastien Montagne
No longer needed now that all code uses that new BKE_blendfile_link_append module, and that instantiation code in BLO_readfile has been removed.
2021-12-06Fix T93388: dropping object on grid in orthogonal view misses the floor planeGermano Cavalcante
`ED_view3d_win_to_3d_on_plane` does not use the `clip_start` and `clip_end` values of the scene, so the `do_clip` option can be misleading especially in the orthographic view where the `clip_start` is negative. For now, don't use the `do_clip` option in orthographic view.
2021-12-06Fix T93732: Snap Cursor not working after changing Add Object settingsGermano Cavalcante
`g_data_intern.state_default.gzgrp_type` is a very specific member and cannot be set to default.
2021-12-06Shader Nodes: Declare nodes in their own namespaceAaron Carlisle
Follow up on rB1df8abff257030ba79bc23dc321f35494f4d91c5 This puts all static functions in geometry node files into a new namespace. This allows using unity build which can improve compile times significantly - The namespace name is derived from the file name. That makes it possible to write some tooling that checks the names later on. The filename extension (cc) is added to the namespace name as well. This also possibly simplifies tooling but also makes it more obvious that this namespace is specific to a file. - In the register function of every node, I added a namespace alias namespace `file_ns = blender::nodes::node_shader_*_cc`;. This avoids some duplication of the file name and may also simplify tooling, because this line is easy to detect. The name `file_ns` stands for "file namespace" and also indicates that this namespace corresponds to the current file. In the future some nodes will be split up to separate files and given their own namespace This will allow function names to be simplified similar to rBfab39440e94 Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13480
2021-12-06Cleanup: Remove unused next and prev pointers in bNodeTypeHans Goudey
2021-12-06Cleanup: Remove unnecesary node type draw callbackHans Goudey
As a followup to 338c1060d5d7, apply the same change to the node drawing callback. This helps to simplify code when the complexity of a callback isn't necessary right now.
2021-12-06Cleanup: Remove unnecessary node type callbacks for drawingHans Goudey
Currently there are a few callbacks on `bNodeType` that do the same thing for every node type except reroutes and frame nodes. Having a callback for basic things complicates code and makes it harder to understand, and reroutes and frames are special cases in larger way. Arguably frame nodes shouldn't even be drawn like regular nodes, given that it adds a case of O(N^2) looping through all nodes. "Unrolling" the callbacks makes it easier to see what's happening, and therefore easier to optimize. Differential Revision: https://developer.blender.org/D13463
2021-12-06Cleanup: clang-tidy: modernize-redundant-void-argAaron Carlisle
This change follows up on recent c --> c++ conversions
2021-12-05Cleanup: Add missing includeAaron Carlisle
Fixes compilation errors after rBd5efda72f501 Re sorted some includes.
2021-12-05Cleanup: Migrate all shader nodes to c++Aaron Carlisle
This will be useful in the future to use the new socket builder API Aditional changes: - Declare variables where initialized - Do not use relative includes Differential Revision: https://developer.blender.org/D13465
2021-12-05Geometry Nodes: use array instead of map in GeometrySetJacques Lucke
`GeometrySet` contains at most one component of each type. Previously, a map was used to make sure that each component type only exists once. The overhead of a map (especially with inline storage) is rather large though. Since all component types are known at compile time and the number of types is low, a simple `std::array` works as well. Some benefits of using `std::array` here: * Looking up the component of a specific type is a bit faster. * The size of `GeometrySet` becomes much smaller from 192 to 40 bytes. * Debugging a `GeometrySet` in many tools becomes simpler because one can easily see which components exists and which don't
2021-12-05Fix (unreported): off-by-one error when setting curve handlesJacques Lucke
The problem is that `current_mask` can become `selection.size()`. The loop could also be refactored to break out of it when the end of the selection is reached. This can be done separately.
2021-12-04Compositor: Migrate most nodes to new socket builder APIAaron Carlisle
This patch leaves a out a few nodes: - Group Nodes - Image input node - File output node - Switch View - Cryptomatte These nodes above are a bit more complicated and should be worked on individually. Differential Revision: https://developer.blender.org/D13266
2021-12-04Create generic modal functions from GRAPH_OT_decimateChristoph Lendenfeld
This patch extracts the modal functions from GRAPH_OT_decimate and makes them generic so they can be reused by future operators Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D9326 Ref: D9326
2021-12-04Cleanup: Use LISTBASE_FOREACH macroHans Goudey
2021-12-04Cleanup: Use references in node editor, other improvementsHans Goudey
This helps to tell when a pointer is expected to be null, and avoid overly verbose code when dereferencing. This commit also includes a few other cleanups in this area: - Use const in a few places - Use `float2` instead of `float[2]` - Remove some unnecessary includes and old code The change can be continued further in the future.
2021-12-03Cleanup: Remove unused codeHans Goudey
This is very old and is unlikely to be useful in the near future.
2021-12-03Cleanup: Const, use references, C++ typesHans Goudey
Also remove some unnecessary includes
2021-12-03Cleanup: Comments and ordering in node editor headerHans Goudey
2021-12-03Cleanup: Use typed enum for node resize directionHans Goudey
2021-12-03ImBuf: Made Wrapping and Cropping optional in IMB_transform.Jeroen Bakker
`IMB_transform` is used in VSE. It had a required crop parameter for cropping the source buffer. This is not always needed. In the image engine we want to use the use the `IMB_transform` with wrap repeat. Both options are mutual exclusive and due to performance reasons the wrap repeat is only available when performing a nearest interpolation.
2021-12-03Cleanup: move public doc-strings into headers for 'bmesh'Campbell Barton
Some minor improvements to doc-strings too. Ref T92709
2021-12-03Fix T93541: Use warning instead of error for exceeding layer limitsJesse Yurkovich
Instead of using RPT_ERROR, use RPT_WARNING which will not raise an exception to Python. This broke some scripts (including FBX import) which already check for a None return value. Ref D13458 Reviewed By: campbellbarton