The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.
  • How to catch SubDialog errors?

    python
    3
    0 Votes
    3 Posts
    419 Views
    mikeudinM
    Thanks! So will find some workaround.
  • Get Objects from the Layer?

    r21 python
    4
    0 Votes
    4 Posts
    549 Views
    ferdinandF
    Hi, if I am not overlooking something here, the function recurse_hierarchy is neither recursive nor will it retrieve the layers for all objects in the scene. It will retrieve the layers for all siblings of the passed node, that were born after that node. You probably made a mistake copying your code or misunderstood what is meant by recursive. Cheers, zipit
  • Move Tag Position in the Stack?

    r21 python
    5
    0 Votes
    5 Posts
    784 Views
    B
    @r_gigante Gotcha. Thanks for the warning.
  • Add Commands to ShowPopupDialog

    r21 python
    7
    0 Votes
    7 Posts
    1k Views
    B
    @m_adam Thanks for further clarification. @Ashton_FCS_PluginDev 's code works but I guess I'll just use the result of the ShowPopupDialog to trigger commands, as I added in the previous code.
  • Clicking Group Children Causes Bitmap to Redraw Incorrectly

    python
    3
    3
    0 Votes
    3 Posts
    636 Views
    ?
    @m_adam Thanks, Maxime, for the temporary workaround and for bumping it to the development team. I hope this is fixed soon!
  • Create VRay material

    Moved python
    3
    0 Votes
    3 Posts
    694 Views
    Passion3DP
    Hi Sebastian, Thank you for your response. I found the identifiers of the different VRay materials in the file c4d_symbol.h. Everything works.
  • C++ Shader Plug-In Best Practices

    c++ r21 sdk windows
    6
    1
    3 Votes
    6 Posts
    1k Views
    ManuelM
    hello, thanks @PluginStudent for the answer here if (obj != nullptr) // If I'm checking for nullptr could I just use if(obj) as in Python? The correct way is to check against nullptr, that's a c++11 standard. if (obj) could lead to false positive and bugs. String is not the same thing as maxon::String. String is the classic API while maxon::String is the Maxon API. You can read more about that in the manual about strings Error handling is super eady to use, we got every thing to do so, you should definitely use it. Check Our manual about Error Handling Last but not least you can probably use our Url class to handle file or filename. Give it a look Cheers, Manuel
  • Script to center axis but have Y axis 0, or bottom of model

    Moved python r19 r20 r21
    3
    0 Votes
    3 Posts
    1k Views
    L
    Manuel, thanks for taking the time and posting some links. Last night I was reading up on the Matrix and trying wrapping my head around it. I think I was stuck in the wrong area, I was trying to convert a baseObject to a pointObject to do the transformations.I would perfer not to have to open the axis window, but instead handle all this in a Python Function. I will look over the docs and samples to get a better idea of what I need to do. Thanks again for taking the time to respond to my post!
  • Identify when scene is rendering (Redshift)

    python
    6
    0 Votes
    6 Posts
    1k Views
    rsodreR
    @wen I was trying to do the same the past days. I could'nt figure out how to detect if Redshift IPR is enabled, but I found some relevant RS Ids. The 1038666 command opens the IPR window, but as far as I know there's no way to get the dialog instance to call IsOpen() The 1036752 CoreMessage is sent during IPR renders, but without any additional parameters (PAR1/PAR2). Not sure if there's something else we can extract from that message. What I ended up doing is adding a bool to my plugin to enable IPR features, but would be good to enable automatically.
  • Custom Tokens with Team Render Server

    6
    1 Votes
    6 Posts
    1k Views
    M
    @fwilleke80 Yes or the RenderData but that means the data needs to be there before the token evaluation which is done before any scene execution render wise. Cheers, Maxime
  • COLOR Constants Guide & Documentation Error

    python r21
    2
    1
    2 Votes
    2 Posts
    307 Views
    ManuelM
    Hello, thanks for sharing this with the everybody. COLOR_TIMELINE is now EX_COLOR_TIMELINE the documentation will be updated to reflect that change. Cheers, Manuel
  • Generator GetDimension() not called

    r21 c++
    9
    0 Votes
    9 Posts
    1k Views
    rsodreR
    @r_gigante ok thanks! I managed a workaround by filling my dummy spline with two zero length segments at the claculated bounding box limits.
  • Deleting/clearing PluginInfo

    c++
    3
    0 Votes
    3 Posts
    388 Views
    fwilleke80F
    Super, thank you!!
  • Different behaviour with Resource File? R20/R21

    5
    0 Votes
    5 Posts
    976 Views
    M
    BitmapButtonCustomGui.SetImage was just extended in R21 to support c4d.IconData as well, but the behavior didn't changed. I guess the issue is more related to R21 What is News - Fixes Fixed a memory leak in bitmaps.InitResourceBitmap(). So basically previously c4d.bitmaps.InitResourceBitmap produced a memory leak where the allocated BaseBitmap was never released, so that's why previously without copying it, it was working. But you should pass True to copyBmp to copy the BaseBitmap now since the BaseBitmap will be released at the destruction of icon variable by the Python Garbage Collection, but if you don't copy it, the BitmapButtonCustomGui will still use the previous BaseBitmap pointer, which will produce a crash since it will be dead. Glad you found the issue. Cheers, Maxime.
  • AddButton "Pressed" in GeDialog

    5
    0 Votes
    5 Posts
    779 Views
    RenatoTR
    HI R. I already used the BitmapButtonCustomGui for my dialog. Just i got some Gui corruption problems so I tried to switch to standard button... but the corruption of gui was not caused by it. Thanks for your answer. Renato T.
  • Applying a Target Expression tag to a child object of GVO

    c++ sdk
    10
    0 Votes
    10 Posts
    1k Views
    mfersaouiM
    @m_magalhaes Hello, Thank you so much.
  • HashMap operator = cannot access private member

    r19 c++
    5
    0 Votes
    5 Posts
    670 Views
    C4DSC
    @r_gigante Maybe a little late, but thanks for the info anyway. Always useful, and much appreciated! I went with a custom implementation using a BaseArray to store the information, and from there used the specific index in the array as the value in an HashMap Instead of the wanted: maxon::HashMap<Int32, DataStruct> mymap; I went with: class MyHashMap { ... maxon::BaseArray<DataStruct> mArray; maxon::HashMap<Int32, Int32> mArrayIndexMap; }; This is more or less what you have described. The only drawback here is that I still haven't found out how to implement range-based loop support ... but I went with using the old-fashioned indexed loop usage. Good enough for its purpose.
  • How to set completely custom render output filename?

    python
    6
    0 Votes
    6 Posts
    2k Views
    r_giganteR
    @jcooper said in How to set completely custom render output filename?: How do I control how much zero-padding is used for the $frame token? We typically use 4-digit, zero-padded frame tokens, but what if a situation called for, say, 6 digits? Hi John, with regard to the $frametoken the zero-padding is hardcoded but as stated by @zipit you can workaround it by registering your token (see here) . How do I get at the RenderData for a specific renderer such as Redshift? For instance, it has its own "filename" attribute, but I don't know how to access/modify it from the python API. You need to retrieve the RedShift BaseVideoPost and retrieve the corresponding data from its BaseContainer. Check the code below # Get the active RenderData renderData = doc.GetActiveRenderData() if renderData is None: raise RuntimeError("Failed to retrieve the render data.") # Get the active render settings renderSettings = renderData.GetData() if renderSettings is None: raise RuntimeError("Failed to retrieve the render settings.") # Get the first video post videopost = renderData.GetFirstVideoPost() if videopost is None: raise RuntimeError("Failed to retrieve the videopost associated with the render data.") # Search for the RedShift videopost while videopost is not None and videopost.GetType() != 1036219: print "RedShift is not set as renderer in the active RenderData, check next" videopost = videopost.GetNext() rsAOV = None # Retrieve the AOV -> Filname param value if videopost is not None and videopost.GetType() == 1036219: rsAOV = videopost[c4d.REDSHIFT_RENDERER_AOV_PATH] # Reads the path stored in the render setting path = renderSettings[c4d.RDATA_PATH] # Add token to the path path = path + rsAOV # Tokenizes the path from the render engine rpd = {'_doc': doc, '_rData': renderData, '_rBc': renderSettings, '_frame': 1} exclude = [] finalFilename = c4d.modules.tokensystem.FilenameConvertTokensFilter(path, rpd, exclude)+".png" print finalFilename
  • How to properly use OpenSSL for local validation

    c++ r21
    5
    0 Votes
    5 Posts
    887 Views
    S
    Just FYI: you find that information regarding ./res/libs/win64 in the documentation: Development for Microsoft Window
  • Rebuild a scene with Python

    9
    0 Votes
    9 Posts
    2k Views
    M
    Hey, I understand your frustration unfortunately here Python is not to blame but Cinema 4D API in general since Python is only a subset of the C++ API and you have the same limitation (in your case) in C++. But yes we try to improve. Cheers, Maxime.