Align XY missing use_alignxy_face_area property #4

Closed
opened 2024-07-21 16:26:00 +02:00 by usfreitas · 5 comments
Collaborator

The use_alignxy_face_area property is missing from __init__.py. The property UI then does not get rendered in the Sidebar and the console prints:

rna_uiItemR: property not found: SceneProperties.use_alignxy_face_area
< home folder >/.config/blender/4.2/extensions/blender_org/print3d_toolbox/ui.py:112

Suggested solutions

  • Reinstate the property in the print_3d scene properties. BTW, I could not find the commit where it got deleted .
  • (Alternative) Remove the property row from the Sidebar UI (not my preferred solution), but make the option true per default.
The `use_alignxy_face_area` property is missing from `__init__.py`. The property UI then does not get rendered in the Sidebar and the console prints: > rna_uiItemR: property not found: SceneProperties.use_alignxy_face_area > < home folder >/.config/blender/4.2/extensions/blender_org/print3d_toolbox/ui.py:112 ## Suggested solutions - <del>Reinstate the property in the `print_3d` scene properties. BTW, I could not find the commit where it got deleted </del>. - <del>(Alternative)</del> Remove the property row from the Sidebar UI <del>(not my preferred solution)</del>, but _make the option true per default_.
Author
Collaborator

I've just found the commit. I think I understand the intention. However, if the property is removed from the UI in the Sidebar, the user risks never seeing it, unless they open up the Adjust Last Operation menu.

I think this option is very important, and IMO it should default to true. It makes sense for it to be turned on for all the use cases I can think off. Otherwise, the alignment risks being perturbed if there is a large number of very small faces selected together with a few large ones. For instance, if the mesh is from a 3D scan.

Is there a way to show the property on the Sidebar UI without having to include it in the print_2d scene properties?

As an alternative, the option should be on per default. Maybe this is the better way, as I think most users would expect the tool to behave as if it were on, but would not necessarily recognize the need to turn it on, even when the property is clearly visible.

I'm amending my suggestions above.

I've just found the commit. I think I understand the intention. However, if the property is removed from the UI in the Sidebar, the user risks never seeing it, unless they open up the `Adjust Last Operation` menu. I think this option is very important, and IMO it should default to true. It makes sense for it to be turned on for all the use cases I can think off. Otherwise, the alignment risks being perturbed if there is a large number of very small faces selected together with a few large ones. For instance, if the mesh is from a 3D scan. Is there a way to show the property on the Sidebar UI without having to include it in the `print_2d` scene properties? As an alternative, the option should be on per default. Maybe this is the better way, as I think most users would expect the tool to behave as if it were on, but would not necessarily recognize the need to turn it on, even when the property is clearly visible. I'm amending my suggestions above.
Collaborator

Note that it is not the only tool that have options in the adjust last operation panel, Make Manifold also has options there, and most tools in Blender are done this way. I do not see the issue with that.

Making option enabled by default, is another topic. All my models are always correctly aligned to XY, so I actually never used this tool.
I just now tested it with multiple models of different shapes and topology, and it is indeed resulting in better orientations every single time with the option enabled.

Thank you for catching that! It will be enabled it by default in next release.

Note that it is not the only tool that have options in the adjust last operation panel, `Make Manifold` also has options there, and most tools in Blender are done this way. I do not see the issue with that. Making option enabled by default, is another topic. All my models are always correctly aligned to XY, so I actually never used this tool. I just now tested it with multiple models of different shapes and topology, and it is indeed resulting in better orientations every single time with the option enabled. Thank you for catching that! It will be enabled it by default in next release.
Author
Collaborator

Enabling the option is the better way IMO.

Just don't forget to remove the row with the property in ui.py (line 112) to get rid of the rna_uiItemR error on the console.

Enabling the option is the better way IMO. Just don't forget to remove the row with the property in `ui.py` (line 112) to get rid of the `rna_uiItemR` error on the console.
Collaborator

God dammit! I forgot about ui prop.

Hey, I think Face Areas is not a descriptive name, do you have a better name in mind for this property? I was thinking about Weighted by Face Area or Normalize by Face Area or Adjust by Face Area or Account for Face Area.

God dammit! I forgot about ui prop. Hey, I think `Face Areas` is not a descriptive name, do you have a better name in mind for this property? I was thinking about `Weighted by Face Area` or `Normalize by Face Area` or `Adjust by Face Area` or `Account for Face Area`.
Author
Collaborator

I think Weight by Face Area or Weight Normals by Face Area would be more accurate. However, this is a complex concept. It will always be hard to describe it succinctly, and still inform enough to make it clear.

But, honestly, I don't really see the point of this needing to be a user-adjustable parameter at all. I can't imagine a use case where you would want to align a model according to some faces and not weight the faces' contribution by their areas.

The only reason I don't suggest removing it right away, is that the person who came up with the tool thought this should be left for the user to decide, so perhaps they see something I don't.

So I think removing it from the sidebar and giving it a sensible default is a good approach. That way, users without deep knowledge don't need to bother with a weird parameter, but those who need to change it (if any) may still have the possibility to do it.

I think `Weight by Face Area` or `Weight Normals by Face Area` would be more accurate. However, this is a complex concept. It will always be hard to describe it succinctly, and still inform enough to make it clear. But, honestly, I don't really see the point of this needing to be a user-adjustable parameter at all. I can't imagine a use case where you would want to align a model according to some faces and _not_ weight the faces' contribution by their areas. The only reason I don't suggest removing it right away, is that the person who came up with the tool thought this should be left for the user to decide, so perhaps they see something I don't. So I think removing it from the sidebar and giving it a sensible default is a good approach. That way, users without deep knowledge don't need to bother with a weird parameter, but those who need to change it (if any) may still have the possibility to do it.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: extensions/print3d_toolbox#4
No description provided.