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

Immediately create object on initialisation in API #763

Open
BradyAJohnston opened this issue Feb 28, 2025 · 0 comments
Open

Immediately create object on initialisation in API #763

BradyAJohnston opened this issue Feb 28, 2025 · 0 comments
Labels
API Related to internal and external API

Comments

@BradyAJohnston
Copy link
Owner

Related to #762

Currently the parsing of the data and the creation of an object inside of Blender are separate processes. I think these should instead be one and the same. If a Molecule or Trajectory exist, then they should have a corresponding object that represents all of that data in the scene.

Rather than the current approach of creating an object with a style parameter, we should instead add styles to an already created object.

# old
mol.create_object(style='ribbon')

# new
mol.add_style(type='ribbon', selection='a_named_attribute_selection')
mol.add_style(type='ball_and_stick', selection='is_nucleic')

Requires creation of internal node logic for editing node trees, but this shouldn't be too difficult.

@BradyAJohnston BradyAJohnston added the API Related to internal and external API label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Related to internal and external API
Projects
None yet
Development

No branches or pull requests

1 participant