Command to create a Nodes Modifier
-
Hi there,
I'm trying to find the correct command to create a scene nodes modifier (Nodes Modifier) object. The one in the command manager doesn't seem to do anything. I'm finding various methods in which to call up a Nodes Modifier Object through Python to no avail. Any advice would be much appreciated.
-
Hey @ImperfectLink,
Welcome to the Maxon developers forum and its community, it is great to have you with us!Getting Started
Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.
- Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
- Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
- Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.
It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.
About your First Question
The posting you linked to was a legacy posting, I have deleted it. You can find all relevant information in this posting or in the Support entry of the site nav. Your question is a bit ambiguous but I assume you want to instantiate a nodes modifier? Or what do you mean by "the command"? I would say it works like this:
import c4d import maxon from mxutils import CheckType doc: c4d.documents.BaseDocument # The currently active document. op: c4d.BaseObject | None # The primary selected object in `doc`. Can be `None`. def main() -> None: """Called by Cinema 4D when the script is being executed. """ node: c4d.BaseObject = CheckType(c4d.BaseObject(maxon.neutron.DEFORMER_ID)) doc.InsertObject(node) c4d.EventAdd() if __name__ == '__main__': main()You can find all the Neutron (the code name for scene nodes) IDs here. What stands out that this instantiates a scene node deformer and not a 'modifier', which is indeed a bit puzzling. But both share the same numeric value for their ID:

In the API there is
maxon.neutron.DEFORMER_IDbut no modifier ID. And in the UI there is only a modifier. But since they share the type ID and also type name (Scene Nodes Deformer) they must be the same thing and the node editor just renames the entity when it is being inserted for some reason.Cheers,
Ferdinand -
@ferdinand Thanks for the reply. This will help immensely thank you.