Revision 15c3617 by Campbell Barton December 16, 2021, 05:27 (GMT) |
Cleanup: simplify file saving logic Revert part of the fix from 073669dd8588a3b80dfffee98b4f239b4baee8c8 that initialized the file-path on first save as it's no longer needed. Also remove relbase argument to BLI_path_normalize as the destination file paths shouldn't use relative locations. |
Revision 8dbd406 by Campbell Barton December 16, 2021, 05:27 (GMT) |
WM: various changes to file writing behavior Saving with only a filename (from Python) wasn't being prevented, while it would successfully write the file to the working-directory, path remapping and setting relative paths wouldn't work afterwards as `Main.filepath` would have no directory component. Disallow this since it's a corner case which only ever occurs when path names without any directories are used from Python, the overhead of expanding the working-directory for all data saving operations isn't worthwhile. The following changes have been made: - bpy.ops.wm.save_mainfile() without a filepath argument fails & reports and error when the file hasn't been saved. Previously it would write to "untitled.blend" and set the `G.main->filepath` to this as well. - bpy.ops.wm.save_mainfile(filepath="untitled.blend") fails & reports and error as the filename has no directory component. - `BLI_path_is_abs_from_cwd` was added to check if the path would attempt to expand to the CWD. |
Revision 4e98d97 by Aaron Carlisle December 16, 2021, 02:30 (GMT) |
Nodes: Begin splitting composite node buttons into individual files Currently, most node buttons are defined in `drawnode.cc` however, this is inconvenient because it requires editing many files when adding new nodes. The goal is to minimize the number of files needed to add or update a node. This commit moves most of the node layout functions for composite nodes into their respected `source/blender/nodes/composite/nodes` file. In the future, these functions will be simplified to `node_layout` once files have their own namespace. See {D13466} for more information. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13523 |
Revision 5de109c by Campbell Barton December 16, 2021, 00:41 (GMT) |
Remove G.relbase_valid In almost all cases there is no difference between `G.relbase_valid` and checking `G.main->filepath` isn't an empty string. In many places a non-empty string is already being used instead of `G.relbase_valid`. The only situation where this was needed was when saving from `wm_file_write` where they temporarily became out of sync. This has been replaced by adding a new member to `BlendFileWriteParams` to account for saving an unsaved file for the first time. Reviewed By: brecht Ref D13564 |
Revision 4b12f52 by Campbell Barton December 16, 2021, 00:38 (GMT) |
Cleanup: spelling |
Revision 807efa8 by Campbell Barton December 16, 2021, 00:38 (GMT) |
Cleanup: clang-format |
Revision 366ec5f by Campbell Barton December 16, 2021, 00:38 (GMT) |
Cleanup: unused variable warning |
Revision b265b44 by Hans Goudey December 16, 2021, 00:05 (GMT) |
Fix various cases of incorrect filtering in node link drag search Some nodes didn't check the type of the link's socket for filtering. Do this with a combination of manually calling the node tree's validate links function and using the helper function for declarations. Also clean up a few cases that added geometry sockets manually when they can use the simpler helper function. |
Revision 36a830b by Hans Goudey December 15, 2021, 23:37 (GMT) |
Fix: Compare node missing from link drag search This was missing from rB11be151d58ec0ca955f. It uses the same approach as the quadrilateral node. |
Revision 49311a7 by Hans Goudey December 15, 2021, 21:00 (GMT) |
Fix: Crash in nodes modifier with missing node group We cannot depend on node->id being non-null for group nodes. |
Revision aa55cb2 by Hans Goudey December 15, 2021, 20:51 (GMT) |
Cleanup: Use const arguments, references Also slightly change naming to avoid camel case. |
Revision 43875e8 by Hans Goudey December 15, 2021, 20:27 (GMT) |
Cleanup: Remove no-op node preview function calls This patch removes no-op node editor preview code (`PR_NODE_RENDER`) and most calls to `BKE_node_preview_init_tree`. The only remaining call is in the compositor. - Shader nodes previews don't seem to do anything. - In-node previews for the texture node system doesn't work either. This is a first step to refactoring to remove `preview_xsize`, `preview_ysize`, and `prvr` from nodes in DNA, aligned with the general goal of removing runtime/derived data from data structs. Differential Revision: https://developer.blender.org/D13578 |
Revision b32f5a9 by Brecht Van Lommel December 15, 2021, 19:47 (GMT) |
Revision 11be151 by Hans Goudey December 15, 2021, 15:51 (GMT) |
Node Editor: Link Drag Search Menu This commit adds a search menu when links are dragged above empty space. When releasing the drag, a menu displays all compatible sockets with the source link. The "main" sockets (usually the first) are weighted above other sockets in the search, so they appear first when you type the name of the node. A few special operators for creating a reroute or a group input node are also added to the search. Translation is started after choosing a node so it can be placed quickly, since users would likely adjust the position after anyway. A small "+" is displayed next to the cursor to give a hint about this. Further improvements are possible after this first iteration: - Support custom node trees. - Better drawing of items in the search menu. - Potential tweaks to filtering of items, depending on user feedback. Thanks to Juanfran Matheu for developing an initial patch. Differential Revision: https://developer.blender.org/D8286 |
Revision 474adc6 by Hans Goudey December 15, 2021, 15:34 (GMT) |
Refactor: Simplify spreadsheet handling of cell values Previously we used a `CellValue` class to hold the data for a cell, and called a function to fill it whenever necessary. This is an unnecessary complication when we have virtual generic arrays and most data is already easily accessible that way anyway. This patch removes `CellValue` and uses `fn::GVArray` to provide access to data instead. In the future, if rows have different types within a single column, we can use a `GVArray` of `blender::Any` to interface with the drawing. Along with that, the use of virtual arrays made it easy to do a few other cleanups: - Use selection domain interpolations from rB5841f8656d95 for the mesh selection filter. - Change the row filter to only calculate for necessary indices. Differential Revision: https://developer.blender.org/D13478 |
Revision d79868c by Jacques Lucke December 15, 2021, 14:46 (GMT) |
Fix T93975: add more nested instance limit checks Differential Revision: https://developer.blender.org/D13585 |
December 15, 2021, 14:46 (GMT) |
Initialize the fourth and final instance variable of MemoryProxy The constructor of MemoryProxy initializes 3 of 4 instances variables. If a MemoryProxy is constructed and MemoryProxy::free is called on this instance, buffer_ is undefined and 'delete buffer_;' causes errors. Although this misuse pattern does not exist in the current codebase it already tripped up the Address Sanitizer on various occasions while debugging unrelated problems. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13569 |
Revision 1a833db by Johnny Matthews December 15, 2021, 14:04 (GMT) |
Geometry Nodes: Add Selection to Attribute Statistics This adds a bool field selection input to the Attribute Statistics node. This is useful for running calculations on a subset of the input field data rather that then whole set. Differential Revision: https://developer.blender.org/D13520 |
Revision e85d7d5 by Campbell Barton December 15, 2021, 13:15 (GMT) |
Fix T93971: "Center Cursor & Frame All" fails to redraw bda9e4238a07a72c26598ea9025e00f6ca896750 changed smooth-view not to redraw when there were no changes made. Redrawing is needed for repositioning the cursor. Subscribe to changes to the 3d cursor to ensure all view ports are updated (not just the current one). |
Revision c101ded by Campbell Barton December 15, 2021, 12:45 (GMT) |
Cleanup: remove disabled code Originally pointcache wasn't supported when the file wasn't saved. Remove commented code as this hasn't been the case for a long time. |
|