Hello @pattatk-maxon,
Welcome to the Maxon developers forum and its community, it is great to have you with us!
Getting StartedBefore 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 Account⚠ Please pick another username, it is obviously not okay to have "maxon" in your username. You can do this from Avatar in Menu Bar > Edit Settings > Change Username. Please do this within the next fourteen days (until 02/06/2025), otherwise we will rename it.
Please also note that we usually do not provide support to unverified accounts as yours (you never verified your mail). I also assume this comes from the same team as this support request did? You could also reach us via our contact form (when confidential information must be exchanged) but we should stop bothering end user support.
About your First QuestionYour request is unfortunately very ambiguous, as you lack the reproducibility aspect lined out in Support Procedures: How to Ask Questions. , i.e., no executable code and data foundation with which we could reproduce your claims. I have seen your _remap_assetsfunction, but it ties into the rest of your file (it at least also calls _pathmap_recognized_types) and we cannot start poking around in your code/file to get it running in the first place.
The function GetAllAssetsNew is the Python frontend for the message MSG_GETALLASSETS which among others is broadcasted into a document by the Asset Inspector to gather all assets in a scene (via C4DAtom::MultiMessage). This means that each scene element that wants to support its path, font, etc, parameters being managed, must actively implement that message. It also means anything that is not a scene element (C4DAtom) cannot support it. Or to put it differently, if it does not show up in the Asset Inspector, it is not supported.
Your questions are all too ambiguous, I cannot really answer any of them.
What does 'aren't being properly remapped' mean concretely? Which are the 'certain Redshift cache' files? What are 'globalized' path names? Are you talking about absolute paths? Which attachments are not captured by the function and what do you consider to be an 'attachment'? Do you mean assets? And when you do, which assets are not being captured by the function?The recommended approach for comprehensive path mapping in Cinema 4D + Redshift on DeadlineCloud?
I am not really sure what is 'comprehensive path mapping' for you, but I assume you want to map/transform the paths referenced in a scene file. MSG_GETALLASSETS (GetAllAssetsNew in Python) is the tool for that. But there is no guarantee that a scene will expose everything with that message, only the things which cannot be recomputed are guaranteed to be exposed.
In general, you could also just abstractly iterate over a scene graph to for example find all scene elements that have a parameter of DTYPE_FILENAME:
"""Prints all DTYPE_FILENAME parameters to be found in the active scene. """ import c4d import mxutils 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. """ # We iterate over all scene elements in the document but ignore caches. element: c4d.BaseList2D for element in mxutils.RecurseGraph(doc, False, True, True): # Now we iterate over its description to find parameters of DTYPE_FILENAME. data: c4d.BaseContainer pid: c4d.DescID for data, pid, _ in element.GetDescription(c4d.DESCFLAGS_GET_NONE): # Get data type of the last component of the DescID and then check if it is a filename. dtype: int = pid[pid.GetDepth() - 1].dtype if dtype == c4d.DTYPE_FILENAME: print(f"Found path parameter with the label '{data[c4d.DESC_NAME]}' and value " f"'{element[pid]}' in node '{element}'.") print ("Done.") if __name__ == '__main__': # Execute main() main()Here for example run on an empty scene:
e98f75c9-0202-4030-b2bb-d7f9d3d7e11a-image.png
What you will not be able to discover this way, are paths buried in GraphNode instances, e.g., nodes in Material Node graphs. You could also traverse them when you come across such graph, but that is not done automatically by RecurseGraph as it is a pure Cinema API graph traversal. Please note that when you test this locally, despite my warning, you might see your material nodes and their paths being reflected in this output. These are then Cinema API emulation (BaseList2D) nodes for the GraphNode nodes, to be able to display them in the Attribute Manager. There is no guarantee that they will be present in every scene, as they are constructed on demand, so you must traverse these graphs yourself to be sure.
But in general, I would not advise doing this manually, as Cinema 4D scenes are much more complex than you probably realize, and you will then have to deal with all that complexity. It is not out of the question that there is a bug in MSG_GETALLASSETS as we did recently some work there, but it is more likely that you look for things being exposed by that message which simply by design are not (e.g., some cache which can be recomputed easily). What we did not even touch is the whole cloud-overly-long path thing you are doing (your last support request), and how it could interfere with asset handling.
When you need more help, please make sure to provide for us executable examples, and please open separate requests for each of them (there are at least three different issues mentioned here in your bullet points).
Cheers,
Ferdinand
PS: What we did not even touch, is that your _remap_assets is incorrect, as you explicitly want to target Redshift but at the same time do not support node materials. Your code might work partially due to the mentioned emulation layer nodes, but when you let this code then run in a production environment with no GUI, or without interacting with the GUI first, this emulation layer won't exist. You can have a look at this thread to get a sense of what to do. You would have to implement each render engine you want to support.