new addon simple_deform_helper #104464

Open
EMM wants to merge 29 commits from Guai_Wo_Ge_EMM/blender-addons:simple_deform_helper into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
First-time contributor
https://projects.blender.org/blender/blender-addons/issues/103207 https://projects.blender.org/blender/blender/issues/105367 https://github.com/AIGODLIKE/simple_deform_helper https://www.youtube.com/watch?v=X5q8bMRjzOg Merge request for new addon Simple Deform Modifier Visual adjustment tool
EMM added 1 commit 2023-03-03 09:45:21 +01:00
EMM changed title from new addon simple_deform_helper to WIP: new addon simple_deform_helper 2023-03-04 02:17:38 +01:00
EMM requested review from Campbell Barton 2023-03-04 02:19:37 +01:00
EMM requested review from Thomas Dinges 2023-03-04 02:19:38 +01:00
EMM changed title from WIP: new addon simple_deform_helper to new addon simple_deform_helper 2023-03-04 02:20:35 +01:00
EMM added 1 commit 2023-03-06 07:39:47 +01:00
EMM added 1 commit 2023-03-09 07:59:30 +01:00
EMM requested review from Damien Picard 2023-03-09 08:00:41 +01:00
Member

Hi, this is cool!

Here are a few remarks:

UI

  • In the 3D view header, the deformer options should be separated into method, axis, and angle, and not sticking to each other.
  • The gizmo and UI should be hidden if the modifier is disabled.
  • The properties displayed in the header when gizmos are used should have less precision (maybe 4 significant digits?).
  • When using the gizmos, the performance starts good, and quickly degrades after about one second. The framerate drops to ~1fps in a trivial scene.
  • I can’t assign a custom origin object and use the gizmos, I get this error:
Traceback (most recent call last):
  File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/simple_deform_helper/gizmo.py", line 174, in draw
    self.update_gizmo_matrix(context)
  File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/simple_deform_helper/gizmo.py", line 145, in update_gizmo_matrix
    (up, down), (up_, down_) = self.get_limits_pos(
  File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/simple_deform_helper/utils.py", line 265, in get_limits_pos
    up_ = ex(up_limits)
  File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/simple_deform_helper/utils.py", line 262, in <lambda>
    ex = lambda a: cls.set_reduce(down, cls.set_reduce(cls.set_reduce(
NameError: free variable 'down' referenced before assignment in enclosing scope

Snapping

  • The Ctrl key has the effect of snapping to the closest 57.29° (?!) when editing the angle of deformation. It should use the closest 5°, and closest 1° when using Ctrl + Shift (same as ordinary rotate).
  • The Ctrl key has the effect of offsetting both limits. It should instead be snapping the limits (maybe to the closest .10, and .01 when using Shift).
  • The Shift key should increase sensitivity in those two cases.
  • The limit offset could be assigned to Alt instead.

Code

  • The GPL license file is not generally included with add-ons any more, but the SPDX-License-Identifier line should be at the top of all files.

  • wiki_url is not used any more.

  • Comments and docstrings should be written in English, if the add-on is to be maintained by the community.

  • The bgl module is deprecated. It will be removed in 3.7 and should be replaced by gpu (gpu.state.depth_test_set("ALWAYS")?).

  • The documentation image should be excluded.

  • I believe it would be better to use a depsgraph_update_post handler to clean up, than a timer.

Hi, this is cool! Here are a few remarks: ### UI - In the 3D view header, the deformer options should be separated into method, axis, and angle, and not sticking to each other. - The gizmo and UI should be hidden if the modifier is disabled. - The properties displayed in the header when gizmos are used should have less precision (maybe 4 significant digits?). - When using the gizmos, the performance starts good, and quickly degrades after about one second. The framerate drops to ~1fps in a trivial scene. - I can’t assign a custom origin object and use the gizmos, I get this error: ``` Traceback (most recent call last): File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/simple_deform_helper/gizmo.py", line 174, in draw self.update_gizmo_matrix(context) File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/simple_deform_helper/gizmo.py", line 145, in update_gizmo_matrix (up, down), (up_, down_) = self.get_limits_pos( File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/simple_deform_helper/utils.py", line 265, in get_limits_pos up_ = ex(up_limits) File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/simple_deform_helper/utils.py", line 262, in <lambda> ex = lambda a: cls.set_reduce(down, cls.set_reduce(cls.set_reduce( NameError: free variable 'down' referenced before assignment in enclosing scope ``` ### Snapping - The Ctrl key has the effect of snapping to the closest 57.29° (?!) when editing the angle of deformation. It should use the closest 5°, and closest 1° when using Ctrl + Shift (same as ordinary rotate). - The Ctrl key has the effect of offsetting both limits. It should instead be snapping the limits (maybe to the closest .10, and .01 when using Shift). - The Shift key should increase sensitivity in those two cases. - The limit offset could be assigned to Alt instead. ### Code - The GPL license file is not generally included with add-ons any more, but the SPDX-License-Identifier line should be at the top of all files. - `wiki_url` is not used any more. - Comments and docstrings should be written in English, if the add-on is to be maintained by the community. - The `bgl` module is deprecated. It will be removed in 3.7 and should be replaced by `gpu` (`gpu.state.depth_test_set("ALWAYS")`?). - The documentation image should be excluded. - I believe it would be better to use a `depsgraph_update_post` handler to clean up, than a timer.
Author
First-time contributor

Thank you for your remarks. I will update pr

Thank you for your remarks. I will update pr
EMM added 1 commit 2023-03-10 19:23:27 +01:00
b163fcd062 simple_deform_helper
del wiki_url
update doc_url
del LICENSE file
all files add SPDX-License-Identifier
EMM added 1 commit 2023-03-10 19:46:16 +01:00
EMM added 1 commit 2023-03-11 02:19:53 +01:00
EMM added 1 commit 2023-03-11 03:09:01 +01:00
2a43ceb3c2 header only show method, axis, and angle
Other properties are displayed to VIEW3D_HT_tool_header and VIEW3D_PT_tools_object_options
EMM added 1 commit 2023-03-22 11:44:48 +01:00
EMM added 13 commits 2023-04-02 21:37:44 +02:00
Author
First-time contributor

Hello, the interface has been changed, and some have been placed on the right side of the top bar, and in the tool settings
In the performance section, I tested that the time for a single modal run can be controlled to within 0.03s. If the deformation wireframe is turned off, it will be faster (20w faces, my computer is 3070+11600k), which is similar to directly adjusting the performance of the modifier

The data structure will be a bit more complex because of the data caching

Angle snap I set by the snap value of the rotation operator

Everything else has been modified

Help me see if there are any further issues

Hello, the interface has been changed, and some have been placed on the right side of the top bar, and in the tool settings In the performance section, I tested that the time for a single modal run can be controlled to within 0.03s. If the deformation wireframe is turned off, it will be faster (20w faces, my computer is 3070+11600k), which is similar to directly adjusting the performance of the modifier The data structure will be a bit more complex because of the data caching Angle snap I set by the snap value of the rotation operator Everything else has been modified Help me see if there are any further issues
EMM added 1 commit 2023-04-03 03:39:25 +02:00
412f2d2d89 fix Lattice SimpleDeform get Bound Box error
obj.data.points.foreach_get('co_deform', list_vertices)
EMM added 1 commit 2023-04-03 05:03:26 +02:00
801faa0304 draw text add poll
only scale obj and simple poll show
EMM closed this pull request 2023-04-10 06:50:01 +02:00
EMM reopened this pull request 2023-04-10 06:50:07 +02:00
EMM added 1 commit 2023-04-10 06:50:23 +02:00
Author
First-time contributor

@pioverfour Can you help me see if there are any other changes that need to be made

@pioverfour Can you help me see if there are any other changes that need to be made
Member

Hi, good work, I’ll have another quick look. I need to make it clear that I’m not in a position to accept or reject your add-on though, and that this is not a full code review.

Also, have you read these pages?
https://wiki.blender.org/wiki/Process/Addons and https://wiki.blender.org/wiki/Process/Addons/Guidelines

  • I believe the add-on should be called “Simple Deform Helper”, with spaces, in both the preferences and the UI, as it is both more readable and the convention in Blender add-ons.

  • “Show Deform Wireframe” only has an effect in Stretch mode? If so, make the button greyed out in other modes and add a tooltip so users don’t expect it to do anything.

  • I don’t think it’s useful to show the same options both in the Options popover and the Tool Settings header, choose one.
    image

  • Probably not useful either to show the gizmos if the object or its collections are hidden.
    image

  • It’s unusual to show preferences outside of the User Preferences editor. Here, you display “Show Deform Wireframe” and “Show Set Axis Button”, which are global and get saved with the preferences instead of the file. Also, in this situation the user cannot have different settings in different viewports.

  • You use the "、" character in the preferences. It should be replaced by latin commas ","

Hi, good work, I’ll have another quick look. I need to make it clear that I’m not in a position to accept or reject your add-on though, and that this is not a full code review. Also, have you read these pages? https://wiki.blender.org/wiki/Process/Addons and https://wiki.blender.org/wiki/Process/Addons/Guidelines - I believe the add-on should be called “Simple Deform Helper”, with spaces, in both the preferences and the UI, as it is both more readable and the convention in Blender add-ons. - “Show Deform Wireframe” only has an effect in Stretch mode? If so, make the button greyed out in other modes and add a tooltip so users don’t expect it to do anything. - I don’t think it’s useful to show the same options both in the Options popover and the Tool Settings header, choose one. ![image](/attachments/4203bdae-f0fa-4cec-9d4f-cd7afca81bd1) - Probably not useful either to show the gizmos if the object or its collections are hidden. ![image](/attachments/bb510d77-2501-44cd-8bb6-581b50b36127) - It’s unusual to show preferences outside of the User Preferences editor. Here, you display “Show Deform Wireframe” and “Show Set Axis Button”, which are global and get saved with the preferences instead of the file. Also, in this situation the user cannot have different settings in different viewports. - You use the "、" character in the preferences. It should be replaced by latin commas ","
Author
First-time contributor

Thank you. I want more people to use this addon. This page will help me. After I change these, I will try to mail them to 'bf python' for more complete code review
This is my first time submitting code to a standardized project. If there are any areas where it is difficult to understand, I am sorry. I am trying to make the code cleaner and easier to read

Thank you. I want more people to use this addon. This page will help me. After I change these, I will try to mail them to 'bf python' for more complete code review This is my first time submitting code to a standardized project. If there are any areas where it is difficult to understand, I am sorry. I am trying to make the code cleaner and easier to read
EMM added 2 commits 2023-04-26 07:35:59 +02:00
EMM added 1 commit 2023-04-26 09:45:37 +02:00
b471e648d5 Fixed: object hide not show Gizmo
preferences add show_gizmo_property_location prop
Author
First-time contributor

Hi, good work, I’ll have another quick look. I need to make it clear that I’m not in a position to accept or reject your add-on though, and that this is not a full code review.

Also, have you read these pages?
https://wiki.blender.org/wiki/Process/Addons and https://wiki.blender.org/wiki/Process/Addons/Guidelines

  • I believe the add-on should be called “Simple Deform Helper”, with spaces, in both the preferences and the UI, as it is both more readable and the convention in Blender add-ons.

changed

  • “Show Deform Wireframe” only has an effect in Stretch mode? If so, make the button greyed out in other modes and add a tooltip so users don’t expect it to do anything.

This can be displayed in all modes

  • I don’t think it’s useful to show the same options both in the Options popover and the Tool Settings header, choose one.
    image

I added an property for display location switching
image

  • Probably not useful either to show the gizmos if the object or its collections are hidden.
    image

fixed

  • It’s unusual to show preferences outside of the User Preferences editor. Here, you display “Show Deform Wireframe” and “Show Set Axis Button”, which are global and get saved with the preferences instead of the file. Also, in this situation the user cannot have different settings in different viewports.

I don't know how to store properties in each window, and I will modify them when I find a method

  • You use the "、" character in the preferences. It should be replaced by latin commas ","

changed

> Hi, good work, I’ll have another quick look. I need to make it clear that I’m not in a position to accept or reject your add-on though, and that this is not a full code review. > > Also, have you read these pages? > https://wiki.blender.org/wiki/Process/Addons and https://wiki.blender.org/wiki/Process/Addons/Guidelines > > - I believe the add-on should be called “Simple Deform Helper”, with spaces, in both the preferences and the UI, as it is both more readable and the convention in Blender add-ons. > changed > - “Show Deform Wireframe” only has an effect in Stretch mode? If so, make the button greyed out in other modes and add a tooltip so users don’t expect it to do anything. > This can be displayed in all modes > - I don’t think it’s useful to show the same options both in the Options popover and the Tool Settings header, choose one. > ![image](/attachments/4203bdae-f0fa-4cec-9d4f-cd7afca81bd1) > I added an property for display location switching ![image](/attachments/79f8d5c6-d4a9-42d1-bab9-e6bfd19c4bde) > - Probably not useful either to show the gizmos if the object or its collections are hidden. > ![image](/attachments/bb510d77-2501-44cd-8bb6-581b50b36127) > fixed > - It’s unusual to show preferences outside of the User Preferences editor. Here, you display “Show Deform Wireframe” and “Show Set Axis Button”, which are global and get saved with the preferences instead of the file. Also, in this situation the user cannot have different settings in different viewports. > I don't know how to store properties in each window, and I will modify them when I find a method > - You use the "、" character in the preferences. It should be replaced by latin commas "," > changed
EMM added 1 commit 2023-04-26 11:42:23 +02:00
EMM added 1 commit 2023-05-31 04:09:34 +02:00
Merge conflict checking is in progress. Try again in few moments.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u simple_deform_helper:Guai_Wo_Ge_EMM-simple_deform_helper
git checkout Guai_Wo_Ge_EMM-simple_deform_helper
Sign in to join this conversation.
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: blender/blender-addons#104464
No description provided.