Skip to content

Commit

Permalink
minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed May 25, 2024
1 parent 601f59e commit 0264b93
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions molecularnodes/io/parse/cellpack.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pathlib import Path
from typing import Union
from pathlib import Path
import numpy as np
import bpy

Expand All @@ -22,7 +21,7 @@ def __init__(self, file_path: Union[str, Path]) -> None:
self.chain_ids = self.data.chain_ids

def create_model(
self, name: str = "StarFileObject", node_setup: bool = True, world_scale: float = 0.01
self, name: str = "StarFileObject", node_setup: bool = True, world_scale: float = 0.01, fraction: float = 1.0
) -> bpy.types.Object:
self.data_object = self._create_data_object(name=f"{name}")
self._create_object_instances(name=name, node_setup=node_setup)
Expand Down
4 changes: 2 additions & 2 deletions molecularnodes/io/parse/ensemble.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import bpy
from abc import ABCMeta
import numpy as np
from typing import Union, Optional, Set, List, Dict
from typing import Union
from pathlib import Path
from ... import blender as bl
import warnings
Expand All @@ -26,7 +26,7 @@ def __init__(self, file_path: Union[str, Path]) -> None:

@classmethod
def create_model(
self, name: str = "EnsembleObject", node_setup: bool = True, world_scale: float = 0.01
self, name: str = "EnsembleObject", node_setup: bool = True, world_scale: float = 0.01, fraction: float = 1.0
) -> bpy.types.Object:
"""
Create a 3D model in the of the ensemble.
Expand Down
5 changes: 2 additions & 3 deletions molecularnodes/io/parse/star.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import bpy
import starfile.typing
from bpy.app.handlers import persistent
from typing import Union, Optional, Set, List, Dict
from numpy.typing import NDArray
from typing import Union, Optional, Dict
from pathlib import Path
import starfile
from .ensemble import Ensemble
Expand Down Expand Up @@ -201,7 +200,7 @@ def _update_micrograph_texture(self, *_) -> None:
self.star_node.inputs["Micrograph"].default_value = image_obj

def create_model(
self, name: str = "EnsembleObject", node_setup: bool = True, world_scale: float = 0.01
self, name: str = "EnsembleObject", node_setup: bool = True, world_scale: float = 0.01, fraction: float = 1.0
) -> bpy.types.Object:
from molecularnodes.blender.nodes import get_star_node, MN_micrograph_material

Expand Down
2 changes: 1 addition & 1 deletion molecularnodes/ui/ops.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import bpy
from ..blender import nodes
from typing import Set, Union, Optional, Dict
from typing import Set


class MN_OT_Add_Custom_Node_Group(bpy.types.Operator):
Expand Down

0 comments on commit 0264b93

Please sign in to comment.