[python]Where can I find the documentation of python redshift C4D?
-
Hello there.
I am trying to create rs node material and change the parameters through ptyhon,just like the script below:
This script can create a rs node material ,and change its name to "testName".
And then it print "texturesampler@dmK_EGteLBKu_z6dSyUHgb<com.redshift3d.redshift4c4d.nodes.core.texturesampler.tex0"Here is my question:
1、where Can I find the document of these string parameter just like "com.redshift3d.redshift4c4d.nodes.core.texturesampler".
2、where Can I find the document of these method just like "FindChild","AddChild","GetInputs" and so on. -
Hello @ghparadise,
Welcome to the Plugin Café forum and the Cinema 4D development 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: Asking Questions.
About your First Questions
It depends a bit on what you meant with 'the documentation of Python Redshift'.
Classic API
The old
redshift
module Python API never has been official and was therefore integrated into the Python documentation. This oldredshift
module targeted theGraphView
, i.e., Xpresso node material of Redshift. Technically you did not need that API, as you could retrieve the'node'
branch of a Redshift material, and the rest is then more lest just standard c4d.modules.graphview code. Except for us helping users from time to time here on the forum, there are no SDK code examples for this API.Nodes API
But your screenshot concerns a node material for the Node Editor, i.e., the 'new' node system. There is no dedicated API for Redshift (required) here, and instead you just use the general purpose Nodes API.
- The technical documentation can be found here. The Nodes API encompasses the
graph
,nodes
, andnodespace
frameworks. - Here you can find our Nodes API Python examples, including material nodes and Redshift examples.
Where can I find the document of these string parameter just like "com.redshift3d.redshift4c4d.nodes.core.texturesampler".
You cannot, the Redshift attributes are currently not exposed both in the C++ and Python API. What you can do however, is use the Node Editor. Press
CTRL + E
to open the preferences, and activate the optionIDs
underNode Editor
.When you now select a node, you see its Asset ID (the ID used to instantiate the node) and its ID (the ID used to reference this specific node in the graph):
When you select a port, you will also see its ID.
Where can I find the document of these method just like "FindChild","AddChild","GetInputs" and so on.
They are part of the Nodes API. These function names are a bit ambiguous as the appear on multiple types. You are likely talking about GraphModelInterface, which is the interface representing a graph, and GraphNode which represents entities in a graph such as nodes and ports.
Cheers,
Ferdinand