Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/03/2024 in all areas

  1. This seems to work: """Name-en-US: Solo VORLAGEN Layer Description-en-US: Toggle's the Vorlagen layer's Solo state. """ import c4d def find_vorlagen_layer(root): # Warning: This will only work if "VORLAGEN" is a top-level layer # as we don't iterate the child layers. for layer in root.GetChildren(): if "VORLAGEN" in layer.GetName(): return layer return None def toggle_layer_solo(layer): # source # https://www.youtube.com/watch?app=desktop&v=Uboqi5jQDTU layer_data = layer.GetLayerData(doc) # Toggle the layer's Solo state. layer_data["solo"] = not layer_data["solo"] layer.SetLayerData(doc, layer_data) c4d.EventAdd() #c4d.CallCommand(12147) # Update Screen def main(): doc = c4d.documents.GetActiveDocument() layer_root = doc.GetLayerObjectRoot() vorlagen_layer = find_vorlagen_layer(layer_root) if vorlagen_layer: toggle_layer_solo(vorlagen_layer) c4d.EventAdd() # Execute main() if __name__ == '__main__': main()
    1 point
  2. Hi Steve, This is fantastic, and thank you so much for working on this and making it available to the community! The existing functionality is great, but I'm wondering if you are thinking of extending its capability toward biological molecules? I realize that that is a big ask, but it would be an awesome help for the medical/bio visualization part of the C4D community, which is very active... Perhaps simpler changes might include: - adding a "spacefilling (CPK)" preset, which would probably entail: - adding a "van der Waals radius" setting for Atom size mode - adding an option to remove hydrogen atoms (especially useful for larger biomolecules) If there was a spacefilling preset, it would be relatively easy to get a good surface representation with C4D's volume tools. The "dream list" for biomolecule visualization would include: - adding the ability to import standard biomolecule formats (.pdb, etc) - adding further representations like: protein backbone; ribbon diagram; solvent surface, etc. I know this is way to much to ask, but your plugin is exciting! Best, Nick
    1 point
×
×
  • Create New...