• 8 Votes
    23 Posts
    24k Views
    DunhouD
    Hi community! Add Basic CentiLeo Material support, also with ConvertPorts data, This a "new" GPU Renderer and in active development. I am very interested in it. Not add AOV due to still being in the early stages of development, waiting for this. Cheers~ DunHou
  • Read Before Posting

    Pinned
    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    2 Posts
    88 Views
    ferdinandF
    Hey @CJtheTiger, Thank you for reaching out to us. That seems to be part of what the Cinversity team did before I joined Maxon. This was never a project of the SDK team. And more over, this seems to have been a private project of Niklas Rosenstein, an ex Maxon employe, because the link points to his GitHub. Niklas is still on GitHub, maybe you can send him a message if he still has his old code? But this looks like an R25 or even older project, so this will for sure require some update work. There are also the Cinversity legacy downloads on Maxon's downloads page, but it does not seem to contain it either. Cheers, Ferdinand
  • String to Spline (cast)

    programming
    2
    0 Votes
    2 Posts
    273 Views
    ferdinandF
    Hey @Kantronin, Thank you for reaching out to us. Unfortunately, I do not understand your question. The print out you provided, <c4d.SplineObject object ..., already indicates that the object is a c4d.SplineObject. So, I do not really understand what you mean with 'get a spline-type variable'. To get the underlying editable spline object for a spline generator, e.g., get a spline with editable vertices and tangents for a Flower Spline generator, you should use BaseObject.GetRealSpline. But that is only necessary when you have a BaseObject which under the hood represents a spline. It does not apply when you already have a SplineObject as you do. Cheers, Ferdinand
  • 0 Votes
    13 Posts
    3k Views
    KantroninK
    @ferdinand I'm showing an example with a curved surface composed of 8 zones. Each zone is the union of several polygons with normals oriented in the same direction (represented by an arrow). I think C4D should be able to identify this type of tiling and colorize these areas to highlight them. Depending on the case, this tiling could be important, but most often, creators assemble the faces logically. A window could then offer the option to select each tiling, in order to invert the normals with a single click. A plugin could also do this kind of work, which would save creators time. [image: 1751317789481-surface.jpg]
  • Free plugins all in one : Boghma HUB

    4
    2
    3 Votes
    4 Posts
    2k Views
    S
    Thank you so much. I wand trouble shooting this for a week with Paid ChatGtp (stupidGpt) it couldn’t get it right. It works !!! Thank you.
  • How to expose C++ symbols to Python users as a third party?

    5
    0 Votes
    5 Posts
    1k Views
    M
    Hi @ECHekman sorry it took me more time than I expected. From my meory octane already have a Python module registered in C++. So I assume you want to add symbols to this python module. One important aspect is that the Symbol Parser by itself is completly agnostic of the c4d module therefor you can call it with any Python interpreter. This point is really important because this let you parse your C++ header files whenever you want within your build pipeline. With that's said the Symbol Parser is bundled within the mxutils package which needs the c4d and maxon module. So in order to have it running with any python intepreter you will need to do the following: import sys CI_PROJECT_DIR = r"C:\Users\m_adam.INTERN\Documents\MAXON\gitlab\c4d" # Build path to import the parser_symbol maxon_python_path = os.path.join(CI_PROJECT_DIR, "resource", "modules", "python", "libs") if not os.path.exists(maxon_python_path): raise RuntimeError(f"DEBUG: update_python_symbols - Unable to find {maxon_python_path}") # Get python311 folder where the symbol parser is located mxutils_path, symbol_parser_path = None, None for folder in os.listdir(maxon_python_path): full_path_folder = os.path.join(maxon_python_path, folder) if not os.path.isdir(full_path_folder): continue # We found the mxutils module containing the symbol parser. if os.path.exists(os.path.join(full_path_folder, "mxutils", "symbol_parser")): mxutils_path = os.path.join(full_path_folder, "mxutils") symbol_parser_path = os.path.join(mxutils_path, "symbol_parser") if None in (mxutils_path, symbol_parser_path): raise ImportError(f"Could not find 'symbol_parser' module path in {maxon_python_path}.") sys.path.append(mxutils_path) print(f"DEBUG: Added {mxutils_path} to sys.path.") # Import the symbol parser and do your stuff. import symbol_parser # Do something with it sys.path.remove(mxutils_path) Then the Symbol Parser paradigm is that you first parse your data and then the parser contain Scope that contains member (a name and a value). Therefor once you have parsed your data you can freely output to multiple format if needed. You can also write your own format if you want to. In this case because you are using mostly the Cinema API and not the Maxon API I re-use the same output as the one we use for the c4d Python package. This output is implemented in c4d\resource\modules\python\libs\python311\mxutils\symbol_parser\output_classic_api.py. Everything in the Symbol Parser is open source so feel free to look at it. So to get back to your question find bellow the next code that will parse all the resources files from the Redshift folder and insert them within the "redshift" Python Package. (You usually do not have to do that because Python is parsing automatically the c4d_symbols.h and include such symbols within the c4d Python package this is for the example). With that's said there is basically two ways, one hardcoding the parsed value in your C++ plugin when you register your Python module, the second one using a Python file that will get loaded at the startup of Cinema 4D once your Python module is already loaded and therefor inject symbol into your module. import os import c4d # Only used to retrieve various C4D paths used in this example, but not really necessary otherwise # These imports bellow are not bound to the c4d module therefor they can be used with a standard Python3 interpreter # But this code is written to be executed in the Script Manager, so you may need to adapt the import statement according to how you run this script. from mxutils.symbol_parser.extractor import SymbolParser from mxutils.symbol_parser.output_classic_api import _get_symbol_dict_from_parser def ParseRedshiftResources() -> SymbolParser: # Parse all Redshift ressource files and resolve their values rsDir = os.path.join(os.path.dirname(c4d.storage.GeGetStartupApplication()), "Redshift", "res", "description") parser = SymbolParser(rsDir, parse_mx_attribute=False, parse_define=True, parse_enum=True, parse_static_const=True) # Parse and resolve. Resolve means: # - Transfrom values that depends to others to their actual integer or float values. # - Transform complex values (such as bit mask, arithmetic, etc) into their actual integer or float values. # For more information about what is supported take a look at # https://developers.maxon.net/docs/py/2025_2_0/manuals/manual_py_symbols.html?highlight=symbol%20parser#symbols-parser-features parser.parse_all_files(resolve=True) return parser def OutputPythonFile(parser: SymbolParser): def GeneratePythonFileToBeInjected(parser: SymbolParser) -> str: """Generate a Python file that will inject all parsed symbols into the 'redshift' Python package when this file get imported. This function needs to be called once, most likely during your build pipeline. Once you have generated this Python file you should bundle it with your installer and then install it in the targeted Cinema 4D installation. See PatchCurrentC4DToInjectParsedSymbol for an example of such deployment """ import tempfile tempPath = None # Retrieve a sorted dict containing the symbol name as key and it's value as values # This will flatten all scopes so an enums called SOMETHING with a value FOO in it will result in a symbol named SOMETHING_FOO # If you do not want this behavior feel free to create your own solution, this function is public and declared in # c4d\resource\modules\Python\libs\python311\mxutils\symbol_parser\output_classic_api.py symbolTable = _get_symbol_dict_from_parser(parser) with tempfile.NamedTemporaryFile('w', delete=False) as tmpFile: tempPath = tmpFile.name tmpFile.write("import redshift\n") for name, value in symbolTable.items(): tmpFile.write(f"redshift.{name} = {value}\n") if not os.path.exists(tempPath): raise RunTimeError('Failed to create the Python File to Inject Symbols in "redshift" Python Package') return tempPath def PatchCurrentC4DToInjectParsedSymbol(fileToBeLoaded: str): """This function is going to create a Python file that is going to be called at each startup of Cinema 4D to inject symbols into the "redshift" Python package. This is done by placing the previous file in a place where it can be imported by the C4D Python VM. And by importing this file by editing the python_init.py file located in the preferences. For more information about it please read https://developers.maxon.net/docs/py/2025_2_0/manuals/manual_py_libraries.html?highlight=librarie#executing-code-with-Python-init-py """ import sys import shutil # Pref folder that contains a python_init.py that is laoded once c4d and maxon package is loaded and a libs folder that is part of the sys.path of the c4d Python VM. pyTempDirPath = os.path.join(c4d.storage.GeGetStartupWritePath(), f"Python{sys.version_info.major}{sys.version_info.minor}") # Path to our module that will inject the parsed symbols in the "redshift" Python package pyTempRsDirPath = os.path.join(pyTempDirPath, "libs", "rs_symbols") # Path to the __init__ file of our module that will be called when we import our module # we need to place the file we generated previously in this location. pyTempRsFilePath = os.path.join(pyTempDirPath, "libs", "rs_symbols", "__init__.py") if not os.path.exists(pyTempRsDirPath): os.mkdir(pyTempRsDirPath) if os.path.exists(pyTempRsFilePath): os.remove(pyTempRsFilePath) shutil.copy2(fileToBeLoaded, pyTempRsFilePath) # Now that we have our module that will inject symbols within the "redshift" Python package. We need to get this "rs_symbols" module be called at each startup. # So we use the python_init.py file to get loaded once all plugins are loaded. Therefor the Redshift plugin is already loaded and have already setup its "redshift" Python package. # We will inject a line in this file to load our "rs_symbols" module pyTempInitFilePath = os.path.join(pyTempDirPath, "python_init.py") isImportRsSymbolPresent = False initFileExist = os.path.exists(pyTempInitFilePath) # Because this file me be already present and already patched or contain other content # We should first check if we need to add our import or not if initFileExist: with open(pyTempInitFilePath, 'r') as f: isImportRsSymbolPresent = "import rs_symbols" in f.read() # prepend our import statement to the file if not isImportRsSymbolPresent: with open(pyTempInitFilePath, "w+") as f: content = f.read() f.seek(0, 0) f.write('import rs_symbols\n' + content) pythonFileGeneratedPath = GeneratePythonFileToBeInjected(parser) PatchCurrentC4DToInjectParsedSymbol(pythonFileGeneratedPath) def OutputCppFile(parser): # Retrieve a sorted dict containing the symbol name as key and it's value as values # This will flatten all scope so an enums called SOMETHING with a value FOO in it will result in a symbol named SOMETHING_FOO # If you do not want this behavior feel free to create your own solution, this function is public and declared in # c4d\resource\modules\Python\libs\python311\mxutils\symbol_parser\output_classic_api.py symbolTable = _get_symbol_dict_from_parser(parser) contentToPaste = 'auto mod_rs = lib.CPyImport_ImportModule("redshift");\n' contentToPaste += 'auto modDict = lib.CPyModule_GetDict(mod_rs);\n' for name, value in symbolTable.items(): contentToPaste += f'\nauto name = lib.CPyUnicode_FromString("{name}");\n' contentToPaste += 'if (!name)\n' contentToPaste += ' CPyErr_Print();\n' contentToPaste += f'maxon::py::CPyRef value = lib.CPyLong_FromInt32({value});\n' contentToPaste += 'if (!value)\n' contentToPaste += ' CPyErr_Print();\n' contentToPaste += 'if (!lib.CPyDict_SetItem(modDict, name, value))\n' contentToPaste += ' CPyErr_Print();\n' return contentToPaste def main() -> None: # Parse the Redshift resources and return the parser that hold the parsed values parser = ParseRedshiftResources() # First way: Generate a file that patch the current C4D with a Python file that you need to deploy on the installer. You may prefer this option since you can update this file without having to recompile your plugin. OutputPythonFile(parser) # Second way: Output pseudo C++ code that can be pasted within your C++ plugin after you initialize your custom Python module. You may want to call this whole script before you compile in your build pipeline and put the "cppContent" within a file that will get compiled automatically cppContent = OutputCppFile(parser) if __name__ == '__main__': main() So the system is really modular and being able to run on a regular Python interpreter let you integrate it within your build pipeline to suits your needs. If you have any questions, please let me know. Cheers, Maxime.
  • [FREE PLUGIN] Redshift Light Manager

    plugin-information download
    2
    2
    3 Votes
    2 Posts
    1k Views
    S
    Hello. I have a looupdeck., is it possible to link the light Manager to (redshift) to the knobs, So I can control the intensity and Exposure
  • how to use the commands from Octane/Redshift's symbols.h

    programming
    2
    2
    0 Votes
    2 Posts
    691 Views
    ferdinandF
    Hey @RTF, Thank you for reaching out to us. There is no fully automatic way to do this, as it is up to third parties to expose their APIs to Python. When a vendor does not offer a Python API, you can do two things: Simply define the symbols yourself in your Python code, they are just integer values after all. With mxutils.ImportSymbols you can import symbols from a resource, e.g., a symbols.h file. It is (a part of) the very mechanism we use to automatically expose the symbols from the native Cinema 4D C++ API to the Python API. Cheers, Ferdinand
  • Graphic card

    off-topic
    4
    0 Votes
    4 Posts
    943 Views
    P
    Great input, thanks. I will have a look at the Mac mini, if not, I will go back to a windows desktop. Again, thank you both. Regards, pim
  • Expose material node inputs to material attributes

    off-topic-question
    3
    0 Votes
    3 Posts
    714 Views
    K
    Hi @ferdinand , Thanks for the clarification. I will contact user support and request this as a feature.
  • KDTree or OcTree with C4D Python

    chit-chat
    5
    0 Votes
    5 Posts
    1k Views
    gheyretG
    tend to be very complex computationally and therefore not very sensible to be implemented in Python. yeah, I forgot the BaseView, but whatever, I agree whit you. And this is just the beginning, I'm still in the research and testing phase. My final goal is to write a procedural tree generator, so maybe combine L-System to improve some performance, I'll also try to write an Octree. Thank you for your suggestion and reply. Cheers! Gheyret
  • Redshift API documentation

    2
    0 Votes
    2 Posts
    687 Views
    i_mazlovI
    Hi @hamgod , 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: Asking Questions. About your First Question Unfortunately there's no single place with aggregated Redshift Python API documentation. Such things are usually discussed on redshift forums and as a side effect are partially available in some of threads on this forum here. Cheers, Ilia
  • Keep Needing to Login

    chit-chat
    2
    0 Votes
    2 Posts
    498 Views
    i_mazlovI
    Hi @presuta , 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: Asking Questions. About your First Question Please note that this developers forum is for the public APIs of Maxon products related topics. We unfortunately cannot help with the end user issues. Please ask your end user questions in our Support Center. Cheers, Ilia
  • Issues with my license

    chit-chat
    2
    0 Votes
    2 Posts
    698 Views
    ferdinandF
    Hello @0x0f0000, 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: Asking Questions. About your First Question I am sorry to hear that you have issues with your license. But this is not an end-user forum, but a development support forum, i.e., software developers can get here support in developing for Maxon products. Please visit our Maxon.net: Support Center to receive end-user support. Cheers, Ferdinand
  • Cannot post?

    chit-chat
    4
    1
    0 Votes
    4 Posts
    853 Views
    chuanzhenC
    @ferdinand Thanks for the detailed explanation
  • Help on Car Rig

    learning-resource
    3
    0 Votes
    3 Posts
    854 Views
    C
    @m_adam oops, sorry...yeah wrong forum. Went to Cineversity.. thanks
  • Center Axis with Python

    programming
    5
    1
    0 Votes
    5 Posts
    1k Views
    i_mazlovI
    Hi @Kantronin, Instead of creating multiple consequent postings please consolidate them in a single one. I've also noticed that you've added "programming" tag but haven't mentioned the language you're talking about (is it c++ or python?). Regarding your questions. Transforming the axis of a PointObject effectively means transforming the point values. There're some helping commands that I've shown you in my previous message, but what they effectively do is just transforming the points. Please have a look into the operation_transfer_axis_s26.py example, which demonstrates how to perform axis translation. As for the rotation part, I'd need to point you once again to our Matrix Manual, which actually contains the answer to your question. Namely, the chapter "Constructing and Combining Transforms" explains the usage of functions c4d.utils.MatrixRotX(), c4d.utils.MatrixRotY() and c4d.utils.MatrixRotZ(). I will not copy & paste the same code snippet from our manual, so please check it youself. Combining these with the example above should do the trick for you, unless you don't have the initial transformation of your ring splines. If that's the case, then your task turns into a way more complex form of the optimization problem. Please also note, that you can only do the object axis transformations on PointObject (and on PolygonObject since it's inherited from PointObject). This effectively means that if you're using the Osplinecircle instead of an ordinary Ospline, this wouldn't work, as it doesn't store any points inside. In this case you'd need to convert to Ospline. If that's not an option for you, you can check the Geometry Axis and Geometry Orientation scene nodes, as they allow you to transform the axis "on-the-fly", so this would work even with non-point objects. Cheers, Ilia
  • 0 Votes
    7 Posts
    2k Views
    i_mazlovI
    Hi @yaya, I see your point here and I can only guess if such behavior is expected or not, as this is (and I've already mentioned this to you earlier) a question that has nothing to do with development. In general it sounds like a bug, so you're very welcome to reach out to our Support Team and ask them for a proper workaround if they actually classify this issue as a bug. I'm moving your thread to general talk section in case someone from our community might be willing to share their experience on that topic. Cheers, Ilia
  • Add Title Items (not packable) to Custom Menu

    programming
    4
    0 Votes
    4 Posts
    962 Views
    ferdinandF
    Well, my answer answers that, check out the posting I linked to. You must insert a MENURESOURCE_SUBTITLE: menu.InsData(c4d.MENURESOURCE_SUBTITLE, "My Heading")