davidhaver-WIP-realize-depth #3

Closed
David-Haver wants to merge 65 commits from David-Haver/blender-old:davidhaver-WIP-realize-depth into WIP-realize-depth

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

65 Commits

Author SHA1 Message Date
50e2511232 xMerge branch 'main' of https://projects.blender.org/blender/blender into davidhaver-WIP-realize-depth 2024-03-21 16:15:09 +02:00
4bdcbf8c8b fixed conflict with main 2024-03-21 16:15:00 +02:00
4370ae85cf davidhaver-WIP-realize-depth
Pull Request: blender/blender#2
2024-03-21 14:55:18 +01:00
059c73dc9f returned std::max(value, 0) in depth_override 2024-03-21 15:53:26 +02:00
a331c835f2 SpecificInstancesChoice -> VariedDepthOption 2024-03-21 14:22:33 +02:00
7f42563d71 resolve conflict? 2024-03-21 13:37:15 +02:00
9ce905cbaa making the code more readable 2024-03-21 01:19:39 +02:00
24f953b562 changed realize_instances to the correct overload 2024-03-20 22:02:32 +02:00
04c5545827 splited selection and depths iuy of RealizeInstancesOptions + miscellaneous 2024-03-19 21:12:14 +02:00
530014b766 styling fixes 2024-03-16 19:00:41 +02:00
92b690bf12 includes cleanup 2024-03-16 18:59:13 +02:00
e62ed2622f davidhaver-WIP-realize-depth
memory leak fix

Co-authored-by: david.haver <d.n.h.s.b.j@gmail.com>
Pull Request: blender/blender#1
2024-03-14 14:12:56 +01:00
david.haver
52893077e6 fixed compents being freed premutrely 2024-03-13 21:50:15 +02:00
david.haver
3b376b2f2b returned temp_geometry_set as not_to_realize_set and fixed memory issue 2024-03-12 17:21:43 +02:00
david.haver
5b38b1fb66 remove temp_geometry_set 2024-03-11 22:06:11 +02:00
Arye
bcf559122f Merge branch 'main' into WIP-realize-depth 2024-03-10 13:24:35 +02:00
AryeComb
f421076caa Introduce 'geometry_set_from_reference' for better abstraction.
Splits 'foreach_geometry_in_reference' logic into 'geometry_set_from_reference' for improved code clarity and modularity.
Minor adjustments to related functions for consistency.
2024-03-03 18:38:29 +02:00
Arye
ef43c9db4d Move specialised function to the geometry module
The PR adds two variations to the functions  'attribute_foreach' and 'gather_attributes_for_propagation'.
I decided it's better to move them into the realize_instances.cc file instead of the 'geometry_set.cc' due to how specific they are.
2024-03-03 13:02:13 +02:00
AryeComb
e4100aee8c Fix Merge "Conflicts" 2024-02-28 16:31:56 +02:00
AryeComb
d5ca8fa4fa Merge branch 'main' into WIP-realize-depth 2024-02-28 16:20:46 +02:00
AryeComb
f7dee8752b Fix compiler optimazation error 2024-02-25 14:40:56 +02:00
Arye
e814b47704 make format 2024-02-20 14:13:16 +02:00
Arye
73b64daff1 Fix some logic
If at least one from all the Instances has a child with a relevant attribute -> include the attributes from the current Instances domain
2024-02-20 14:12:26 +02:00
Arye
163f2e7045 Fix Merge 'conflicts' 2024-02-18 17:40:36 +02:00
Arye
339a83d8cf Merge branch 'main' into WIP-realize-depth 2024-02-18 17:33:40 +02:00
AryeComb
4a1f8926b5 clean-up of unused parts 2024-02-13 09:27:30 +02:00
Arye
38242924f3 Update geometry_set.cc 2024-02-06 16:59:16 +02:00
Arye
9b1a13d354 Remove and fix comments style 2024-02-06 15:38:41 +02:00
Arye
a7b9b63991 Remove redundant 'include instances' variable 2024-02-06 15:21:36 +02:00
Arye
9ed9a816a4 Fix default values 2024-02-06 15:01:57 +02:00
Arye
e3e234702e Make format 2024-02-06 14:59:13 +02:00
Arye
ff01f6fc29 Merge branch 'main' into WIP-realize-depth 2024-02-06 14:07:56 +02:00
Arye
dec876740b remove redundant include 2024-02-06 13:59:03 +02:00
Arye
08bf47e5aa support collection as instances
The current state was that collections were realized recursively.
Now they mimic the behavior of the collection info node
2024-02-06 13:57:20 +02:00
AryeComb
efe2563c4e support realize depth input
Added support for using a new 'realize all' field. Also, the selection input is not working properly. The only missing part is supporting collections as instances; currently, they are getting flattened to 'keep everything' geometry set compatible. It shouldn't be too hard to support that.
2024-02-04 00:33:58 +02:00
Arye
bed27190d2 Clean-up
Cleaned many parts of the code, mainly making it more similar to the other component implementations and removing redundant code and comments.
This also makes the performance much closer to the original code.
2024-01-23 15:41:44 +02:00
AryeComb
3ad10b8386 Temporarily set the default value of the depth to 99
This is a tmp change so that old files will be opened correctly.
2024-01-22 11:45:16 +02:00
AryeComb
f354ffcf0e Merge branch 'main' into WIP-realize-depth 2024-01-22 11:25:33 +02:00
Arye
dd1822dcc0 Utilize depth input in the preprocess stage.
This adds two new variations for the functions: 'attribute_foreach' and 'gather_attributes_for_propagation'. The functions are the same but also accept a VArray containing the depth value for each instance component.

There is still a 'known bug' that a fully realized component (such as a mesh, etc.) may get attributes from a realized instance that doesn't hold any mesh component itself. This behavior may be debatable in some scenarios.

After some thought, I decided that the current design is okay-ish.
2024-01-21 14:23:21 +02:00
Arye
ad8ff59c30 Propagate attributes to child instances components
There is still a 'bug' where it will use all the attributes in the current elements (even from instances that were not realized). This is also true for the other component. We just need to modify the gather_attributes_for_propagation() function to consider the depth value
2024-01-17 18:20:18 +02:00
Arye
82591f96da Merge branch 'main' into WIP-realize-depth 2023-12-31 14:54:28 +02:00
AryeComb
075692567a I have no idea why I commented it out. 2023-12-27 16:59:45 +02:00
AryeComb
1bbee2c131 remove commented code 2023-12-27 16:42:34 +02:00
AryeComb
02e2331486 Merge branch 'main' into WIP-realize-depth 2023-12-27 16:10:06 +02:00
AryeComb
1471c00ecb Add min and remove comments 2023-12-27 12:56:11 +02:00
AryeComb
81bc51988e Still working but simpler code 2023-12-27 10:23:35 +02:00
AryeComb
08b052e045 Merge branch 'main' into realize-depth 2023-12-27 00:16:42 +02:00
AryeComb
6879dc3f94 Now it's working! 2023-12-27 00:11:34 +02:00
AryeComb
5dfc1b7867 trying to fix that 2023-12-26 23:20:52 +02:00
AryeComb
7ae7891f99 Update join_geometries.cc 2023-12-26 21:16:52 +02:00
AryeComb
ec881e5845 make a dummy function 2023-12-25 18:20:25 +02:00
AryeComb
fed9c3a86d Merge branch 'main' into realzie-depth 2023-12-25 15:09:52 +02:00
AryeComb
ce4a0d0b53 Add a new function to the join geometry header 2023-12-25 15:08:50 +02:00
AryeComb
f53bfdda37 the realize part is working, but the transform not. 2023-12-19 00:37:26 +02:00
AryeComb
5c7515dc6c Update realize_instances.cc
The only missing part is joining the instances
2023-12-18 23:57:18 +02:00
AryeComb
51d699cd24 Add propagate_instances_to_keep function 2023-12-18 20:22:52 +02:00
AryeComb
5626556ff2 Add the recursion branching 2023-12-18 19:44:42 +02:00
AryeComb
356c7aa17c Add current depth and target to all of the funcitons 2023-12-18 19:37:32 +02:00
AryeComb
f18691df21 add comonent as notes// 2023-12-18 19:15:01 +02:00
AryeComb
0a6dc9dec5 Add selction and depth to GatherTasksInfo 2023-12-18 19:11:17 +02:00
AryeComb
8e67398043 Add the depths and selection to the RealizeInstancesOptions options; 2023-12-18 18:54:04 +02:00
AryeComb
86dcc9cc03 Add the code to propagate selection and depth on the instances 2023-12-18 18:49:23 +02:00
AryeComb
bf9cf18328 include join-geometries 2023-12-18 17:19:07 +02:00
AryeComb
648e4bf510 Declare new inputs 2023-12-18 17:18:52 +02:00
AryeComb
28fe2d5349 Add the inputs for the interface 2023-12-18 17:03:53 +02:00