Page MenuHome

Geometry Nodes: Add all UV Smooth and Boundary Smooth options to subdivision node
ClosedPublic

Authored by Himanshi Kalra (calra) on Feb 14 2021, 11:03 PM.

Details

Summary

Replaces the boolean option with enum menus for consistency with the subdivision modifier (rB66151b5de3ff,rB3d3b6d94e6e).

Adds all UV interpolation options.

Diff Detail

Repository
rB Blender
Branch
UV_Smooth_subdivision_surface (branched from master)
Build Status
Buildable 13392
Build 13392: arc lint + arc unit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Hans Goudey (HooglyBoogly) requested changes to this revision.Feb 17 2021, 5:28 AM

Thanks for looking into this!

source/blender/makesrna/intern/rna_nodetree.c
8590–8591

Since these are so long, it would probably be better to find a way to share these RNA enum item arrays.

They can be moved to the top of rna_modifier.c and added to RNA_enum_types.h, then they should be usable here.

We don't do that elsewhere, but since these descriptions are a bit more complicated than usual, and more likely to change, and because the list is longer, I think it makes sense to do it here.

source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
47–48 ↗(On Diff #34066)

You can use nullptr instead of explicitly using IFACE* here since the RNA property names are the same as this anyway.

52 ↗(On Diff #34066)

New line after function missing.

80 ↗(On Diff #34066)

Casting to CustomDataType here is not correct, the cast should be to the type of the enum.

143 ↗(On Diff #34066)

No need to move this line down, just use the same order used for other nodes:

ntype.geometry_node_execute = blender::nodes::geo_node_attribute_vector_math_exec;
ntype.draw_buttons = geo_node_attribute_vector_math_layout;
node_type_update(&ntype, blender::nodes::geo_node_attribute_vector_math_update);
node_type_init(&ntype, geo_node_attribute_vector_math_init);
node_type_storage(
    &ntype, "NodeAttributeVectorMath", node_free_standard_storage, node_copy_standard_storage);
This revision now requires changes to proceed.Feb 17 2021, 5:28 AM
  • Merge branch 'master'
  • Rename uses of subdivision surface to subdivide smooth
  • Share enum with modifier
Eitan Traurig (EitanSomething) marked an inline comment as done.Mar 9 2021, 10:14 PM
Eitan Traurig (EitanSomething) edited the summary of this revision. (Show Details)
Hans Goudey (HooglyBoogly) requested changes to this revision.Mar 9 2021, 10:18 PM

Thanks for updating this patch after the name change. Looking closer, still some assorted changes necessary though.

source/blender/makesdna/DNA_node_types.h
1231

Space after /*, period at the end of the comment.

1234

I don't think there's any need for padding here, I may be wrong though.

1235

Add newline

source/blender/makesrna/intern/rna_modifier.c
598

You'll notice that the names of rna enums exposed outside of a function's scope are longer, so they give more context.

So maybe rna_enum_subdivision_smooth_items, or something like that. Likewise for the other enum.

625

Add a blank line between the two enums

1671–1672

You probably meant to delete "static" too

source/blender/makesrna/intern/rna_nodetree.c
8597–8604

Copy the descriptions for these two properties from the modifier RNA properties.

source/blender/nodes/geometry/nodes/node_geo_subdivide_smooth.cc
49

Extra newline

50

Add newline between functions

81

I don't think CustomDataType is the correct enum here...

The two functions that use these types just get int arguments, so best to keep it at that.

This revision now requires changes to proceed.Mar 9 2021, 10:18 PM
Eitan Traurig (EitanSomething) marked an inline comment as done.Mar 9 2021, 10:44 PM
Eitan Traurig (EitanSomething) marked an inline comment as done.
Eitan Traurig (EitanSomething) marked 4 inline comments as done.Mar 9 2021, 11:03 PM
Eitan Traurig (EitanSomething) marked 3 inline comments as done.
  • Fix newlines
Eitan Traurig (EitanSomething) marked an inline comment as done.Mar 9 2021, 11:10 PM
Hans Goudey (HooglyBoogly) requested changes to this revision.Mar 16 2021, 4:58 AM

Looks like I will be changing the name of this node back to "Subdivision Surface". (rB2e19509e60b3) This already needs an update for current master though. Things move quickly it seems

source/blender/makesdna/DNA_node_types.h
1231

This comment isn't correct, eSubsurfUVSmooth is the right one I think, then eSubsurfBoundarySmooth for the next.

source/blender/makesrna/RNA_enum_types.h
244

Add new line to separate these from the collection enum

This revision now requires changes to proceed.Mar 16 2021, 4:58 AM
  • Merge branch 'master' into UV_Smooth_subdivision_surface
  • Address comments
Eitan Traurig (EitanSomething) marked 2 inline comments as done.Mar 16 2021, 4:17 PM
  • Rebased master and solved merge conflicts
  • Rebased to current master, updated names to match node name
Himanshi Kalra (calra) marked 4 inline comments as done.Mar 25 2021, 8:59 PM

Comments were addressed by Eitan.

Thanks for updating this.

source/blender/makesrna/intern/rna_nodetree.c
8610

This function was removed recently, it probably got caught in a merge?

  • Removing accidentally added func during merge
  • Merge branch 'master' into arcpatch-D10417
Himanshi Kalra (calra) marked an inline comment as done.Mar 26 2021, 9:42 AM
Himanshi Kalra (calra) updated this revision to Diff 36034.EditedApr 9 2021, 8:13 PM
  • Merge branch 'master' into arcpatch-D10417

Updating in case it needs to be part of 2.93

The code looks good do me, though it doesn't apply to master anymore. Do you mind merging master one more time and committing this Himanshi?

source/blender/makesdna/DNA_node_types.h
1230

I suppose the node name should include Geometry, so NodeGeometrySubdivisionSurface

This revision is now accepted and ready to land.Aug 11 2021, 8:54 PM
Himanshi Kalra (calra) marked an inline comment as done.
  • Updated node name to include node category type
  • Resolve conflicts, rebase to master
  • Cleanup: merge conflicts after clean up
  • Added missing header file