-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from BradyAJohnston/docs-node-gen
Overhaul Documentation integrates #300
- Loading branch information
Showing
195 changed files
with
3,063 additions
and
1,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ coverage.xml | |
.coverage | ||
*.npz | ||
*.log | ||
|
||
/.luarc.json | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This is an Asset Catalog Definition file for Blender. | ||
# | ||
# Empty lines and lines starting with `#` will be ignored. | ||
# The first non-ignored line should be the version indicator. | ||
# Other lines are of the format "UUID:catalog/path/for/assets:simple catalog name" | ||
|
||
VERSION 1 | ||
|
||
11e51ada-a84c-4c87-baee-eaa0385c99c1:Molecular Nodes:Molecular Nodes | ||
427147b8-bbce-4652-aca5-f21b1224c1ca:Molecular Nodes/Color:Molecular Nodes-Color | ||
4d52a503-3b55-43c2-b9ec-ff4fcbeda65b:Molecular Nodes/Style:Molecular Nodes-Style |
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,69 @@ | ||
import bpy | ||
|
||
def mn(): | ||
"""Return the MolecularNodes Collection | ||
def mn() -> bpy.types.Collection: | ||
""" | ||
Return the `MolecularNodes` Collection | ||
The collection called 'MolecularNodes' inside the Blender scene is returned. If the | ||
collection does not exist first, it is created. | ||
Returns | ||
------- | ||
coll : bpy.types.Collection | ||
The 'MolecularNodes' collection inside the Blender scene. If it doesn't | ||
exist, it will be created. | ||
""" | ||
coll = bpy.data.collections.get('MolecularNodes') | ||
if not coll: | ||
coll = bpy.data.collections.new('MolecularNodes') | ||
bpy.context.scene.collection.children.link(coll) | ||
return coll | ||
|
||
def data(): | ||
"""A collection for storing MN related data objects. | ||
def data(name="data") -> bpy.types.Collection: | ||
""" | ||
|
||
coll = bpy.data.collections.get('MN_data') | ||
A collection for storing MN related data objects. | ||
Parameters | ||
---------- | ||
name : str, optional | ||
Name of the data collection. Default is "data". | ||
Returns | ||
------- | ||
coll : bpy.types.Collection | ||
The collection for storing MN related data objects. | ||
""" | ||
name = f"MN_{name}" | ||
coll = bpy.data.collections.get(name) | ||
if not coll: | ||
coll = bpy.data.collections.new('MN_data') | ||
coll = bpy.data.collections.new(name) | ||
mn().children.link(coll) | ||
|
||
# disable the view of the data collection | ||
bpy.context.view_layer.layer_collection.children['MolecularNodes'].children['MN_data'].exclude = True | ||
# Disable the view of the data collection | ||
bpy.context.view_layer.layer_collection.children['MolecularNodes'].children[name].exclude = True | ||
return coll | ||
|
||
def frames(name="", parent=None, suffix="_frames"): | ||
"""Create a Collection for Frames of a Trajectory | ||
|
||
Args: | ||
name (str, optional): Name of the collection for the frames. Defaults to "". | ||
parent (_type_, optional): A blender collection which will become the parent | ||
collection. Defaults to the MolecularNodes collection if None. | ||
def frames(name="", parent=None, prefix="frames") -> bpy.types.Collection: | ||
""" | ||
coll_frames = bpy.data.collections.new(name + suffix) | ||
Create a Collection for Frames of a Trajectory | ||
Parameters | ||
---------- | ||
name : str, optional | ||
Name of the collection for the frames. Default is "". | ||
parent : bpy.types.Collection, optional | ||
A blender collection which will become the parent collection. | ||
Default is the MolecularNodes collection if None. | ||
Returns | ||
------- | ||
coll_frames : bpy.types.Collection | ||
The newly created collection for frames. | ||
""" | ||
coll_frames = bpy.data.collections.new(f"{prefix}_{name}") | ||
if not parent: | ||
mn().children.link(coll_frames) | ||
else: | ||
parent.children.link(coll_frames) | ||
|
||
return coll_frames | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.