Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.2 #501

Merged
merged 126 commits into from
Jul 17, 2024
Merged

4.2 #501

merged 126 commits into from
Jul 17, 2024

Conversation

BradyAJohnston
Copy link
Owner

@BradyAJohnston BradyAJohnston commented May 22, 2024

This PR changes Molecular Nodes to be compatible with the Blender 4.2 extensions system, and brings a number a number of other major upgrades.

Extensions Platform

Changed architecture of add-on to be compatible with new extensions platform in Blender 4.2 (here). Bundles the add-on with the required python packages, so installation is as simple as clicking 'install' from inside of Blender's extension system. No need to manually download or install anything additional. Updates for the add-on can also be delivered and installed this way.

Nodes

Color Tag

Utilising the new color_tag attribute for custom node groups, all provided node groups are now colored appropriately.
image

Selection Nodes

Selection nodes have been split into individual node groups and given And and Or inputs to more easily construct selection chains with common boolean operations.
image

Topology Nodes

Topology nodes have been partially overhauled, with some nodes moved to utility nodes and extras included such as the DSSP and Phi / Psi nodes. Phi / Psi nodes do not require pre-computation of any values and can be used just like any other field.
image

Color Nodes

Res Name and Element nodes now go higher, utilising the Index Switch node underneath and panels to ensure the UI remains usable.

image

Trajectories

The underlying method for importing and managing MDAnalysis trajectory / Universes has been overhauled. They are now imported as a Trajectory object. Trajectories along with all other molecular data that is imported is now kept around inside of a MNSession, which is stored under bpy.context.scene.MNSession. This session is pickled and save next to the .blend file on save, so that all of the data can persist between Blender sessions on load.

Selections

Because the connection to the universe is maintained, we now have live and updateable selections.

Calculations

Initial support for functions can be added to the Trajectories. These functions will be executed with the universe as an input, and the output is stored on the resulting mesh. This gives access to custom calculations to be executed in python and the results to be used inside of Geometry Nodes.

Implement changes for compatibility with Blender 4.2

Current build is approved and hosted on the extensions website - need to finish final changes before 4.2 release (https://extensions.blender.org/add-ons/molecularnodes/)

Some feedback from extensions approval:

  • Cleanup commented out lines of the blender_manifest.toml
  • .DS_store and some other files can be cleaned up (potentially download .whl files then use Blender to build package)
  • remove requirements.txt file as no longer needed for package management

@BradyAJohnston BradyAJohnston changed the title 4.2 for Blender 4.2 4.2 May 22, 2024
@BradyAJohnston BradyAJohnston added this to the 4.2 milestone Jun 5, 2024
Update test-addon.yml

Update test-addon.yml

Update test-addon.yml

Update test-addon.yml

Update test-addon.yml

Update test-addon.yml

Update test-addon.yml

Update test-addon.yml

update

update download

update and add testing
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 65.53899% with 601 lines in your changes missing coverage. Please review.

Project coverage is 71.11%. Comparing base (9c1f566) to head (7dfd9ea).
Report is 29 commits behind head on main.

Files Patch % Lines
molecularnodes/io/molecule/ui.py 43.06% 115 Missing ⚠️
molecularnodes/ui/panel.py 9.87% 73 Missing ⚠️
molecularnodes/ui/ops.py 45.76% 64 Missing ⚠️
molecularnodes/blender/nodes.py 62.72% 63 Missing ⚠️
molecularnodes/io/trajectory/selections.py 51.88% 51 Missing ⚠️
molecularnodes/io/trajectory/trajectory.py 83.33% 49 Missing ⚠️
molecularnodes/session.py 72.72% 36 Missing ⚠️
molecularnodes/io/ensemble/star.py 83.44% 25 Missing ⚠️
molecularnodes/io/ensemble/ui.py 62.00% 19 Missing ⚠️
molecularnodes/__init__.py 60.46% 17 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #501      +/-   ##
==========================================
- Coverage   76.06%   71.11%   -4.96%     
==========================================
  Files          42       48       +6     
  Lines        3786     4106     +320     
==========================================
+ Hits         2880     2920      +40     
- Misses        906     1186     +280     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* fix preferences panel and add buttons to install and uninstall template

* tweak install and uninstall

* cleaned up install function

* cleanupd

* fix test

* refactor startup template file
* initial drag and drop support for `.pdb` files

* tinkering with drag and drop operators

* change drag and drop operator to accept multiple files

* pass test
* refactor to make everything under 'entities'

* refactor: rename bob to obj

* replace in tests also

fix build docs

* fix tests
* change to named_attribute() / store_named_attribute9)

* fix trajectory attribute
* add option to remove hydrogen on import of molecules

* add test for deleting hydrogens
* tweak styles

* tweak nucleic acid style
BradyAJohnston and others added 2 commits July 17, 2024 15:56
* fix custom iswitch node name creation

* begin updating docs for 4.2

* update installation docs

* remove compute backbone

* merge 4.2

* cleanup utils menu

* remove old tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DSSP For Cartoon Style
2 participants