Skip to content

Commit

Permalink
+ Fix capture items
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryLingjieMei authored and pvl-bot committed Nov 11, 2024
1 parent c2dc8f7 commit b760f52
Show file tree
Hide file tree
Showing 52 changed files with 148 additions and 112 deletions.
2 changes: 1 addition & 1 deletion infinigen/assets/materials/aluminumdisp2tut.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def geo_aluminumdisp2tut(nw: NodeWrangler, rand=False, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute.outputs["Geometry"],
"Attribute": capture_attribute.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
},
)

Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/bark.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def geo_bark(nw: NodeWrangler):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute.outputs["Geometry"],
"Attribute": capture_attribute.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
},
attrs={"is_active_output": True},
)
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/bark_birch.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def geo_bark_birch(nw, selection=None):
Nodes.GroupOutput,
input_kwargs={
"Geometry": group,
"initial_position": capture_attribute.outputs["Attribute"],
"initial_position": capture_attribute.outputs[1],
},
)

Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/bark_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ def geo_bark_random(nw, base_color, geo_params, selection=None):
Nodes.GroupOutput,
input_kwargs={
"Geometry": group,
"initial_position": capture_attribute.outputs["Attribute"],
"initial_position": capture_attribute.outputs[1],
},
)

Expand Down
4 changes: 2 additions & 2 deletions infinigen/assets/materials/fishbody.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def nodegroup_scales(nw: NodeWrangler):

separate_xyz_7 = nw.new_node(
Nodes.SeparateXYZ,
input_kwargs={"Vector": capture_attribute_1.outputs["Attribute"]},
input_kwargs={"Vector": capture_attribute_1.outputs[1]},
)

attribute_statistic = nw.new_node(
Expand Down Expand Up @@ -595,7 +595,7 @@ def nodegroup_scales(nw: NodeWrangler):
input_kwargs={
"Geometry": capture_attribute_4.outputs["Geometry"],
"attr2": combine_xyz_3,
"attr5": capture_attribute_4.outputs["Attribute"],
"attr5": capture_attribute_4.outputs[1],
},
)

Expand Down
4 changes: 2 additions & 2 deletions infinigen/assets/materials/reptile_brown_circle_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ def geometry_reptile_vor_attr(nw: NodeWrangler, rand=True, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute_1.outputs["Geometry"],
"attr1": capture_attribute.outputs["Attribute"],
"attr2": capture_attribute_1.outputs["Attribute"],
"attr1": capture_attribute.outputs[1],
"attr2": capture_attribute_1.outputs[1],
},
)

Expand Down
4 changes: 2 additions & 2 deletions infinigen/assets/materials/reptile_gray_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ def geometry_reptile_vor_attr(nw: NodeWrangler, rand=True, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute_1.outputs["Geometry"],
"attr1": capture_attribute.outputs["Attribute"],
"attr2": capture_attribute_1.outputs["Attribute"],
"attr1": capture_attribute.outputs[1],
"attr2": capture_attribute_1.outputs[1],
},
)

Expand Down
4 changes: 2 additions & 2 deletions infinigen/assets/materials/reptile_two_color_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ def geometry_reptile_vor_attr(nw: NodeWrangler, rand=True, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute_1.outputs["Geometry"],
"attr1": capture_attribute.outputs["Attribute"],
"attr2": capture_attribute_1.outputs["Attribute"],
"attr1": capture_attribute.outputs[1],
"attr2": capture_attribute_1.outputs[1],
},
)

Expand Down
4 changes: 2 additions & 2 deletions infinigen/assets/materials/scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ def geo_scale(nw, rand=True, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute_4.outputs["Geometry"],
"attr2": capture_attribute_1.outputs["Attribute"],
"attr5": capture_attribute_4.outputs["Attribute"],
"attr2": capture_attribute_1.outputs[1],
"attr5": capture_attribute_4.outputs[1],
},
attrs={"is_active_output": True},
)
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/slimy.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def geo_slimy(nw, rand=False, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute.outputs["Geometry"],
"Attribute": capture_attribute.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
},
)

Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/spot_sparse_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def geometry_spots_sparse(nw: NodeWrangler, rand=True, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute.outputs["Geometry"],
"Attribute": capture_attribute.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
},
)

Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/two_color_spots.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def geo_two_color_spots(nw, rand=True, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute.outputs["Geometry"],
"Attribute": capture_attribute.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
},
)

Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/utils/surface_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def geo_voronoi_noise(nw, rand=False, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute.outputs["Geometry"],
"Attribute": capture_attribute.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
},
)

Expand Down
6 changes: 3 additions & 3 deletions infinigen/assets/objects/cactus/columnar.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ def geo_star(nw: NodeWrangler):
selection = nw.compare(
"EQUAL", nw.math("MODULO", nw.new_node(Nodes.Index), 2), 0
)
circle, _, selection = nw.new_node(
Nodes.CaptureAttribute, [circle, None, selection]
).outputs[:3]
circle, selection = nw.new_node(
Nodes.CaptureAttribute, [circle, selection]
).outputs[:2]
circle = nw.new_node(
Nodes.SetPosition,
[
Expand Down
6 changes: 3 additions & 3 deletions infinigen/assets/objects/cactus/globular.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def geo_globular(nw: NodeWrangler):
selection = nw.compare(
"EQUAL", nw.math("MODULO", nw.new_node(Nodes.Index), 2), 0
)
circle, _, selection = nw.new_node(
Nodes.CaptureAttribute, [circle, None, selection]
).outputs[:3]
circle, selection = nw.new_node(
Nodes.CaptureAttribute, [circle, selection]
).outputs[:2]
circle = nw.new_node(
Nodes.SetPosition,
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def nodegroup_dragonfly_body(
)

reroute = nw.new_node(
Nodes.Reroute, input_kwargs={"Input": capture_attribute.outputs[2]}
Nodes.Reroute, input_kwargs={"Input": capture_attribute.outputs[1]}
)

less_than = nw.new_node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def nodegroup_dragon_fly_head(
)

float_curve_1 = nw.new_node(
Nodes.FloatCurve, input_kwargs={"Value": capture_attribute.outputs[2]}
Nodes.FloatCurve, input_kwargs={"Value": capture_attribute.outputs[1]}
)
node_utils.assign_curve(
float_curve_1.mapping.curves[0],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def nodegroup_leg_part(nw: NodeWrangler):
)

greater_than = nw.new_node(
Nodes.Compare, input_kwargs={0: capture_attribute_1.outputs[2], 1: 0.9}
Nodes.Compare, input_kwargs={0: capture_attribute_1.outputs[1], 1: 0.9}
)

delete_geometry_1 = nw.new_node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def nodegroup_dragonfly_tail(

map_range = nw.new_node(
Nodes.MapRange,
input_kwargs={"Value": capture_attribute.outputs[2], 3: 1.0, 4: 0.8},
input_kwargs={"Value": capture_attribute.outputs[1], 3: 1.0, 4: 0.8},
)

multiply = nw.new_node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ def nodegroup_dragonfly_wing(nw: NodeWrangler):

less_than = nw.new_node(
Nodes.Compare,
input_kwargs={0: capture_attribute.outputs[2], 1: 0.65},
input_kwargs={0: capture_attribute.outputs[1], 1: 0.65},
attrs={"operation": "LESS_THAN"},
)

greater_than = nw.new_node(
Nodes.Compare, input_kwargs={0: capture_attribute.outputs[2], 1: 0.84}
Nodes.Compare, input_kwargs={0: capture_attribute.outputs[1], 1: 0.84}
)

op_or = nw.new_node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,8 @@ def nodegroup_shape_quadratic(
Nodes.GroupOutput,
input_kwargs={
"Mesh": curve_to_mesh,
"spline parameter": capture_attribute.outputs[2],
"spline tangent": capture_attribute_1.outputs["Attribute"],
"spline parameter": capture_attribute.outputs[1],
"spline tangent": capture_attribute_1.outputs[1],
"radius to center": geometry_proximity.outputs["Distance"],
},
)
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/objects/creatures/parts/chameleon.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def nodegroup_chameleon_toe(nw: NodeWrangler):
input_kwargs={
"Geometry": curve_to_mesh,
"Name": "Ridge",
"Value": capture_attribute.outputs[2],
"Value": capture_attribute.outputs[1],
},
attrs={"data_type": "FLOAT", "domain": "POINT"},
)
Expand Down
6 changes: 3 additions & 3 deletions infinigen/assets/objects/creatures/parts/eye_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def nodegroup_eyelid_radius(nw: NodeWrangler):

group_output = nw.new_node(
Nodes.GroupOutput,
input_kwargs={"Geometry": transform, "Attribute": capture_attribute.outputs[2]},
input_kwargs={"Geometry": transform, "Attribute": capture_attribute.outputs[1]},
)


Expand Down Expand Up @@ -634,8 +634,8 @@ def nodegroup_eyelid_circle(nw: NodeWrangler):
Nodes.GroupOutput,
input_kwargs={
"Geometry": set_position,
"Attribute": capture_attribute.outputs[2],
"Attribute1": capture_attribute_1.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
"Attribute1": capture_attribute_1.outputs[1],
},
)

Expand Down
8 changes: 4 additions & 4 deletions infinigen/assets/objects/creatures/parts/ridged_fin.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def nodegroup_fish_fin(nw: NodeWrangler):

separate_xyz_2 = nw.new_node(
Nodes.SeparateXYZ,
input_kwargs={"Vector": capture_attribute.outputs["Attribute"]},
input_kwargs={"Vector": capture_attribute.outputs[1]},
)

add_2 = nw.new_node(Nodes.Math, input_kwargs={0: separate_xyz_2.outputs["X"]})
Expand Down Expand Up @@ -568,7 +568,7 @@ def nodegroup_fish_fin(nw: NodeWrangler):
multiply_24 = nw.new_node(
Nodes.Math,
input_kwargs={
0: capture_attribute_1.outputs[2],
0: capture_attribute_1.outputs[1],
1: capture_z_rigidity.outputs[2],
},
attrs={"operation": "MULTIPLY"},
Expand Down Expand Up @@ -601,8 +601,8 @@ def nodegroup_fish_fin(nw: NodeWrangler):
Nodes.GroupOutput,
input_kwargs={
"Geometry": store_cloth_pin,
"Bump": capture_attribute_1.outputs[2],
"BumpMask": capture_attribute_2.outputs[2],
"Bump": capture_attribute_1.outputs[1],
"BumpMask": capture_attribute_2.outputs[1],
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def nodegroup_wiggles(nw: NodeWrangler):
nodegroup_add_loopbacks().name,
input_kwargs={
"Geometry": addwiggles,
"Vector": capture_attribute.outputs["Attribute"],
"Vector": capture_attribute.outputs[1],
"Amount": group_input.outputs["Loopyness"],
"Randomness": group_input.outputs["LoopRandom"],
},
Expand Down
4 changes: 2 additions & 2 deletions infinigen/assets/objects/fruits/cross_section_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def nodegroup_star_cross_section(nw: NodeWrangler):
Nodes.GroupOutput,
input_kwargs={
"Geometry": set_position,
"curve parameters": capture_attribute.outputs[2],
"curve parameters": capture_attribute.outputs[1],
},
)

Expand Down Expand Up @@ -415,6 +415,6 @@ def nodegroup_coconut_cross_section(
Nodes.GroupOutput,
input_kwargs={
"Geometry": set_position,
"curve parameters": capture_attribute.outputs[2],
"curve parameters": capture_attribute.outputs[1],
},
)
4 changes: 2 additions & 2 deletions infinigen/assets/objects/fruits/fruit_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ def nodegroup_shape_quadratic(
Nodes.GroupOutput,
input_kwargs={
"Mesh": curve_to_mesh,
"spline parameter": capture_attribute.outputs[2],
"spline tangent": capture_attribute_1.outputs["Attribute"],
"spline parameter": capture_attribute.outputs[1],
"spline tangent": capture_attribute_1.outputs[1],
"radius to center": geometry_proximity.outputs["Distance"],
},
)
Expand Down
6 changes: 3 additions & 3 deletions infinigen/assets/objects/fruits/stem_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ def nodegroup_coconut_stem(
map_range_2 = nw.new_node(
Nodes.MapRange,
input_kwargs={
"Value": capture_attribute.outputs[2],
"Value": capture_attribute.outputs[1],
3: group_input.outputs["base scale"],
4: group_input.outputs["top scale"],
},
Expand All @@ -722,7 +722,7 @@ def nodegroup_coconut_stem(
)

map_range_1 = nw.new_node(
Nodes.MapRange, input_kwargs={"Value": capture_attribute.outputs[2], 4: 0.01}
Nodes.MapRange, input_kwargs={"Value": capture_attribute.outputs[1], 4: 0.01}
)

combine_xyz = nw.new_node(
Expand Down Expand Up @@ -759,7 +759,7 @@ def nodegroup_coconut_stem(
Nodes.GroupOutput,
input_kwargs={
"Geometry": join_geometry,
"distance to edge": capture_attribute_1.outputs[2],
"distance to edge": capture_attribute_1.outputs[1],
},
)

Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/objects/fruits/surfaces/durian_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@ def nodegroup_durian_surface(
Nodes.GroupOutput,
input_kwargs={
"Geometry": set_material,
"distance to center": capture_attribute.outputs[2],
"distance to center": capture_attribute.outputs[1],
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,6 @@ def nodegroup_pineapple_cell_body(nw: NodeWrangler):
Nodes.GroupOutput,
input_kwargs={
"Geometry": set_position_1,
"spline parameter": capture_attribute.outputs[2],
"spline parameter": capture_attribute.outputs[1],
},
)
6 changes: 3 additions & 3 deletions infinigen/assets/objects/grassland/flower.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def nodegroup_follow_curve(nw):

separate_xyz = nw.new_node(
Nodes.SeparateXYZ,
input_kwargs={"Vector": capture_attribute.outputs["Attribute"]},
input_kwargs={"Vector": capture_attribute.outputs[1]},
)

attribute_statistic = nw.new_node(
Expand Down Expand Up @@ -225,7 +225,7 @@ def nodegroup_flower_petal(nw):

separate_xyz = nw.new_node(
Nodes.SeparateXYZ,
input_kwargs={"Vector": capture_attribute.outputs["Attribute"]},
input_kwargs={"Vector": capture_attribute.outputs[1]},
)

multiply = nw.new_node(
Expand Down Expand Up @@ -261,7 +261,7 @@ def nodegroup_flower_petal(nw):

separate_xyz_1 = nw.new_node(
Nodes.SeparateXYZ,
input_kwargs={"Vector": capture_attribute.outputs["Attribute"]},
input_kwargs={"Vector": capture_attribute.outputs[1]},
)

add_1 = nw.new_node(Nodes.Math, input_kwargs={0: separate_xyz_1.outputs["X"]})
Expand Down
Loading

0 comments on commit b760f52

Please sign in to comment.