diff --git a/docs/tutorials/05_spa_annotations.md b/docs/tutorials/05_spa_annotations.md index fd0f203a..be468acc 100644 --- a/docs/tutorials/05_spa_annotations.md +++ b/docs/tutorials/05_spa_annotations.md @@ -22,9 +22,9 @@ This tutorial uses single particle analysis tutorial data from Relion 4.0. Download instruction are [here](https://relion.readthedocs.io/en/release-4.0/SPA_tutorial/Introduction.html). You will only need the precalculated results. -## Starfile panel +## Annotation panel -In the Import panel of Molecular Nodes change the type to starfile. +In the Import panel of Molecular Nodes change the type to `Annotation`. ![](https://i.imgur.com/aj7wCXP.png) diff --git a/molecularnodes/assets/MN_data_file_annotation.blend b/molecularnodes/assets/MN_data_file_annotation.blend new file mode 100644 index 00000000..ec53105b Binary files /dev/null and b/molecularnodes/assets/MN_data_file_annotation.blend differ diff --git a/molecularnodes/assets/MN_data_file_starfile.blend b/molecularnodes/assets/MN_data_file_starfile.blend deleted file mode 100644 index f912728c..00000000 Binary files a/molecularnodes/assets/MN_data_file_starfile.blend and /dev/null differ diff --git a/molecularnodes/blender/nodes.py b/molecularnodes/blender/nodes.py index 9dce9e4f..ae49e604 100644 --- a/molecularnodes/blender/nodes.py +++ b/molecularnodes/blender/nodes.py @@ -176,10 +176,10 @@ def get_style_node(object): def annotation_instances_node(group): prev = previous_node(get_output(group)) - is_annotation_instances_node = ("MN_starfile_instances" in prev.name) + is_annotation_instances_node = ("MN_annotation_instances" in prev.name) while not is_annotation_instances_node: prev = previous_node(prev) - is_annotation_instances_node = ("MN_starfile_instances" in prev.name) + is_annotation_instances_node = ("MN_annotation_instances" in prev.name) return prev @@ -428,7 +428,7 @@ def create_starting_nodes_annotation_instances(object, n_images=1): node_output = get_output(group) node_input.location = [0, 0] node_output.location = [700, 0] - node_annotation_instances = add_custom(group, 'MN_starfile_instances', [450, 0]) + node_annotation_instances = add_custom(group, 'MN_annotation_instances', [450, 0]) link(node_annotation_instances.outputs[0], node_output.inputs[0]) link(node_input.outputs[0], node_annotation_instances.inputs[0]) diff --git a/molecularnodes/io/parse/star.py b/molecularnodes/io/parse/star.py index 47c7fc52..60511624 100644 --- a/molecularnodes/io/parse/star.py +++ b/molecularnodes/io/parse/star.py @@ -9,9 +9,9 @@ def _rehydrate_ensembles(scene): if hasattr(obj, 'mn') and 'molecule_type' in obj.mn.keys(): if obj.mn['molecule_type'] == 'star': ensemble = StarFile.from_blender_object(obj) - if not hasattr(bpy.types.Scene, 'MN_starfile_ensembles'): - bpy.types.Scene.MN_starfile_ensembles = [] - bpy.types.Scene.MN_starfile_ensembles.append(ensemble) + if not hasattr(bpy.types.Scene, 'MN_annotation_ensembles'): + bpy.types.Scene.MN_annotation_ensembles = [] + bpy.types.Scene.MN_annotation_ensembles.append(ensemble) class StarFile(Ensemble): def __init__(self, file_path): diff --git a/molecularnodes/io/star.py b/molecularnodes/io/star.py index 82cccd01..c1c7cd33 100644 --- a/molecularnodes/io/star.py +++ b/molecularnodes/io/star.py @@ -10,14 +10,14 @@ bpy.types.Scene.MN_import_star_file_name = bpy.props.StringProperty( name='Name', description='Name of the created object.', - default='NewStarInstances', + default='NewAnnotationInstances', maxlen=0 ) def load( file_path, - name='NewStarInstances', + name='NewAnnotationInstances', node_setup=True, world_scale=0.01 ): diff --git a/molecularnodes/ui/panel.py b/molecularnodes/ui/panel.py index e0e8a51d..672c3a20 100644 --- a/molecularnodes/ui/panel.py +++ b/molecularnodes/ui/panel.py @@ -21,7 +21,7 @@ ('local', "Local", "Open a local file", 1), ('md', "MD", "Import a molecular dynamics trajectory", 2), ('density', "Density", "Import an EM Density Map", 3), - ('star', 'Starfile', "Import a .starfile mapback file", 4), + ('star', 'Annotation', "Import an annotation file", 4), ('cellpack', 'CellPack', "Import a CellPack .cif/.bcif file", 5), ('dna', 'oxDNA', 'Import an oxDNA file', 6) ) diff --git a/tests/test_star.py b/tests/test_star.py index 54b965a5..b9efdcb4 100644 --- a/tests/test_star.py +++ b/tests/test_star.py @@ -94,6 +94,6 @@ def test_rehydration(tmp_path): bpy.ops.wm.read_homefile() assert ensemble._update_micrograph_texture not in bpy.app.handlers.depsgraph_update_post bpy.ops.wm.open_mainfile(filepath=str(tmp_path / "test.blend")) - new_ensemble = bpy.types.Scene.MN_starfile_ensembles[0] + new_ensemble = bpy.types.Scene.MN_annotation_ensembles[0] assert new_ensemble._update_micrograph_texture in bpy.app.handlers.depsgraph_update_post assert new_ensemble.data.equals(ensemble.data)