• 0 Votes
    3 Posts
    411 Views
    B
    @m_magalhaes Thanks for the confirmation.
  • Getting GeDialog Group Width & Height?

    Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    363 Views
    ?
    @r_gigante Thank you, Riccardo! I don't know how I missed that in the documentation, but it is what I needed.
  • How to catch SubDialog errors?

    Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    456 Views
    mikeudinM
    Thanks! So will find some workaround.
  • Move Tag Position in the Stack?

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    909 Views
    B
    @r_gigante Gotcha. Thanks for the warning.
  • SculptTag

    Cinema 4D SDK r20 python windows
    6
    0 Votes
    6 Posts
    941 Views
    M
    The bug is fixed in S22. Cheers, Maxime.
  • SculptObject GetPolygonCopy() documentation

    Cinema 4D SDK python r20 r21
    5
    1 Votes
    5 Posts
    875 Views
    M
    Hi, This is solved in the last documentation update. Cheers, Maxime.
  • Create VRay material

    Moved Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    806 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.
  • 0 Votes
    3 Posts
    718 Views
    ?
    @m_adam Thanks, Maxime, for the temporary workaround and for bumping it to the development team. I hope this is fixed soon!
  • Remove Stray ShowPopUpDialog?

    Cinema 4D SDK r21 python
    8
    0 Votes
    8 Posts
    883 Views
    B
    @m_adam Thanks for the response (and the reference link) Works as expected.
  • BaseBitmap.ScaleIt Documentation

    Cinema 4D SDK python
    3
    1 Votes
    3 Posts
    422 Views
    M
    Hi, This is solved in the last documentation update, see BaseBitmap.ScaleIt. Cheers, Maxime.
  • 0 Votes
    7 Posts
    2k Views
    ?
    @m_adam Thank you, Maxime, for going to this effort.
  • COLOR Constants Guide & Documentation Error

    Cinema 4D SDK python r21
    2
    1
    2 Votes
    2 Posts
    331 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
  • 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!
  • Advice for storing animation in a Hyperfile

    Cinema 4D SDK python sdk
    4
    0 Votes
    4 Posts
    598 Views
    ?
    Additional information here: https://developers.maxon.net/forum/topic/12295/bug-with-getlink-setlink-hyperfile/3 Thank you @m_magalhaes & @r_gigante!
  • OperatorSetData for "Lists"?

    Cinema 4D SDK python r20
    5
    0 Votes
    5 Posts
    944 Views
    r_giganteR
    @esan said in OperatorSetData for "Lists"?: Another quick question. is there still a bug on c4d.GV_OBJECT_OPERATOR_OBJECT_OUT? Yes it's still there and being R20 maintenance ended it's likely to remain. Best, R
  • Get Objects from the Layer?

    Cinema 4D SDK r21 python
    4
    0 Votes
    4 Posts
    589 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
  • How to set completely custom render output filename?

    Cinema 4D SDK 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
  • Creating Keyframes with AutoKey

    Cinema 4D SDK python sdk
    4
    0 Votes
    4 Posts
    1k Views
    M
    Hi @blastframe this is also the behavior of AutoKey in the Editor, so I would say is not an API issue. But you can use BaseDocument.Record to simulate the click of AddKeyFrame (but of course correct parameter have to be checked). Cheers, Maxime.
  • Create BaseBitmap() from Text?

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    544 Views
    B
    @m_adam Thanks for the response. For some reason, the return value is not accepted by the SetFont. It does not error out. It just uses the default font. In addition, how were you able to determine that the [508] is for the font name? I can't seem to see such reference in the documentation. You can check the working code here: import c4d from c4d import gui # Welcome to the world of Python def GetSegoeUiBoldFont(): bcFonts = c4d.bitmaps.GeClipMap.EnumerateFonts(c4d.GE_CM_FONTSORT_HIERARCHICAL) for familyId, familyBc in bcFonts: for fontDescriptionId, fontDescription in familyBc: if fontDescription[508] == "SegoeUI-Bold": return fontDescription print fontDescription def main(): w = 50 h = 50 image_with_text = c4d.bitmaps.GeClipMap() image_with_text.Init(w=w,h=h,bits=32) image_with_text.BeginDraw() image_with_text.SetColor(125,255,255) image_with_text.FillRect(x1=0,y1=0,x2=50,y2=50) image_with_text.SetColor(0,0,0) font_bc = GetSegoeUiBoldFont() print font_bc font_size = 15 image_with_text.SetFont(font_bc,font_size) image_with_text.TextAt(x=10,y=15,txt='head') image_with_text.EndDraw() bmp = image_with_text.GetBitmap() c4d.bitmaps.ShowBitmap(bmp) # Execute main() if __name__=='__main__': main()