• Encouraging evaluation when a document is opened

    python
    3
    0 Votes
    3 Posts
    707 Views
    ferdinandF
    Hello @pyr, without any further replies or questions, we will consider this thread as solved by Thursday and flag it accordingly. Thank you for your understanding, Ferdinand
  • How to check if the object/document in on Render Queue

    sdk c++
    3
    0 Votes
    3 Posts
    646 Views
    ferdinandF
    Hello @victor, without any further replies or questions, we will consider this thread as solved by Thursday and flag it accordingly. Thank you for your understanding, Ferdinand
  • XPresso Material Links Brake when Importing through Command Line

    Moved
    3
    0 Votes
    3 Posts
    514 Views
    ferdinandF
    Hello @janine-mcmaster, without any further replies or questions, we will consider this thread as solved by Thursday and flag it accordingly. Thank you for your understanding, Ferdinand
  • Set Ngons with Python

    7
    0 Votes
    7 Posts
    2k Views
    ferdinandF
    Hi, I am back at work now, if any questions remain, please feel free to ask them. Cheers, Ferdinand
  • DESC_PARENT_COLLAPSE Display

    r20 c++ sdk
    5
    0 Votes
    5 Posts
    1k Views
    J
    Thanks for the response. I was assuming that would be the case. John Terenece
  • Insert scene under object

    python
    5
    0 Votes
    5 Posts
    1k Views
    ROMANR
    Mike, thank you a lot!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • Xpresso set port for all nodes

    python
    3
    0 Votes
    3 Posts
    694 Views
    ROMANR
    @m_magalhaes Thank you for answer!
  • Checking if Cache/Deform Cache Is Dirty?

    c++ r20
    4
    0 Votes
    4 Posts
    858 Views
    D
    Thanks, that was exactly what I needed!
  • Hide "Camera Dependent" from PriorityData

    python
    3
    0 Votes
    3 Posts
    616 Views
    orestiskonO
    Thanks Maxime, "NOCAMERA;" worked, and the priority was a typo, now it does work!
  • How to get spline offset by spline point index ?

    python
    13
    0 Votes
    13 Posts
    3k Views
    ferdinandF
    Hi @everyone, as a little disclaimer, this is my private take on this topic. Cinema does calculate the length of a spline (at least with SplineHelp) in a rather unpretentious fashion as the sum of the Euclidean norms of the underlying LineObject segments, i.e., there is no fancy arc-length calculation going on. Which makes sense in Cinema, since the discrete LineObject is what does effectively count, and not the smooth SplineObject. Since you can get access to the LineObject of a SplineObject and also convert between SplineObject and LineObject vertex indices with SplineHelp.SplineToLineIndex() , this also means that you can both calculate the length of spline as a total and up to a specific vertex. Which then should mean that you can calculate the relative offset for a spline vertex yourself. Practically you can cut out the SplineObject altogether when sampling a spline and just use its associated LineObject. The one nice thing that SplineHelp does for you is though, that it implements a parallel transport for the frames of spline points for you. I.e., realizes that the normals of spline points point into a direction humans would consider "correct" (mathematically these normals are not correct, due to them being modified by parallel transport, but they will look smoother, won't flip when then curvature of the spline flips). Cheers, Ferdinand
  • Getting the value of a gadget

    Moved
    3
    0 Votes
    3 Posts
    399 Views
    R
    Thank you so much. That did it!!
  • How can I update custom tokens when rendering with the Takes System?

    python
    5
    0 Votes
    5 Posts
    967 Views
    N
    Amazing, thank you @ferdinand! I figured GetActiveDocument() was the issue, so I was attempting to use takeData.GetCurrentTake() instead in the GetResolutionTakes callback but it still was exactly the same issue where the active take does not change. I didn't know about the callback data argument that already contains the correct document state in data[0], so thank you for letting me know to use that instead and pointing me to further details in the RegisterToken Documentation. Replacing: doc = c4d.documents.GetActiveDocument() with doc = data[0] renderData = doc.GetRenderData(takeData) with renderData = data[1] to get the following code below worked perfectly: def GetCameraName(data): doc = data[0] bd = doc.GetRenderBaseDraw() sceneCam = bd.GetSceneCamera(doc) camName = sceneCam.GetName() return camName.upper() def GetResolutionActive(data): renderData = data[1] renderResX = round(renderData[c4d.RDATA_XRES]) if renderResX >= 1920: return "highRes" else: return "lowRes" Thank you again very much for the help! Really appreciate it.
  • Checking Object Manager Filtering

    r23 python
    3
    0 Votes
    3 Posts
    611 Views
    CairynC
    @m_magalhaes Thanks for the confirmation. I have meanwhile found that while the API doesn't cover the OM window states, you can still call CallCommand and IsCommandChecked on the functions. c4d.CallCommand(100004762) # Show Search Bar c4d.CallCommand(100004719) # Show Path Bar c4d.CallCommand(100004746) # Show Filter They only address the last used OM though; it doesn't seem to be possible to target a specific OM (like it is possible with the Open/Close flags which are stored as NBITs). And of course it doesn't tell me anything about the current visibility of an object in the OM. If the developers will think about commands to cover the filter/search/root conditions, they may want to go one step back and think about a more general concept to handle the multi-copy windows (Object Manager, Attribute Manager, Timeline) in some way that allows me to ask what was the last window, the active window, a window by index.
  • How to Hide Generator Plugin from the menu?

    python
    5
    0 Votes
    5 Posts
    867 Views
    M
    Unfortually no you can't.
  • Set up selected user data value

    3
    1
    0 Votes
    3 Posts
    595 Views
    ROMANR
    @ferdinand Sorry for the late reply. Yes you understood me correctly. Will this be fixed in new c4d versions?
  • Getting the proper formatting/display on .RES

    macos python r23 sdk
    8
    1
    0 Votes
    8 Posts
    2k Views
    M
    Correct, thanks for poitning it I will add a task to improve documentation of Custom GUI
  • Copy mesh from one object to another with Python

    9
    0 Votes
    9 Posts
    2k Views
    K
    @ferdinand I get Ngon translation map and applied MCOMMAND_MELT but stuck again — as I understand SendModellingCommand only returns new object with melted ngons, but my goal is to correct object that already exists in scene... Is there any other ways of setting up Ngon translation map with python?
  • 0 Votes
    5 Posts
    1k Views
    E
    ok, my apologies. i guess my question is at what point to i check for dirty, and at what point do i insert the nulls?
  • 0 Votes
    4 Posts
    942 Views
    mfersaouiM
    @mfersaoui Hi, I found the following solution: FileMenu = c4d.BaseContainer() resource = c4d.plugins.GeResource() resource.InitAsGlobal() FileMenu.InsData(c4d.MENURESOURCE_SUBTITLE, resource.LoadString(12587))