• Get Active Timeline Request

    Cinema 4D SDK
    7
    0 Votes
    7 Posts
    2k Views
    annA
    Indeed a better sdk will be better. I actually also hope that sdk can recognize which parameters of the object are activated in the object manager. I know that because c4d supports opening multiple object managers at the same time, this is really convenient. But it will also make it impossible to know which object manager the user is using, so there is no way to identify it in the current SDK.
  • Catching when an ID collision occurs

    Cinema 4D SDK c++ sdk
    5
    0 Votes
    5 Posts
    664 Views
    D
    Thanks, this is exactly what I needed!
  • Sizing Plugin Dialogs

    Cinema 4D SDK python s22 sdk
    9
    1
    1 Votes
    9 Posts
    1k Views
    ferdinandF
    Hi @blastframe, without further questions or feedback, by Monday we will consider this thread as solved and flag it accordingly. Cheers, Ferdinand
  • Message when leaving an Edit Text

    Cinema 4D SDK python s22 sdk
    5
    0 Votes
    5 Posts
    702 Views
    ?
    @m_adam Great idea! I'll use a Timer Thanks Maxime!
  • Creating Xpresso Python Node Inputs

    Cinema 4D SDK s22 sdk python
    6
    1
    0 Votes
    6 Posts
    2k Views
    ?
    @m_adam That's a great solution, thank you!
  • Post Deformer Spline

    Cinema 4D SDK c++ r20 sdk
    7
    2
    0 Votes
    7 Posts
    2k Views
    D
    @m_magalhaes said in Post Deformer Spline: Thanks, Manuel! This is what I was looking for!
  • 0 Votes
    5 Posts
    827 Views
    ?
    @m_adam Hi Maxime, I did try your example and I saw it working as a gadget but, you're right, I want to communicate between two GeDialogs. I followed your advice on using CoreMessage and found success with SpecialEventAdd. Thank you!
  • Setting the FontData for a Text Object

    Cinema 4D SDK s22 python sdk
    2
    0 Votes
    2 Posts
    607 Views
    ?
    For whatever reason, the default Text Object has no FontData in Text[c4d.PRIM_TEXT_FONT]. By creating a FontData instance, I was able to set the Font. import c4d def main(doc): textObject = c4d.BaseObject(c4d.Osplinetext) doc.InsertObject(textObject) fontData = c4d.FontData() bc = c4d.BaseContainer() bc.SetString(500, 'Arial') bc.SetString(501, '11') bc.SetInt32(502, 400) bc.SetInt32(503, 0) bc.SetString(509, 'Arial') bc.SetString(508, 'ArialMT') fontData.SetFont(bc) textObject[c4d.PRIM_TEXT_FONT] = fontData textObject[c4d.ID_BASELIST_NAME] = bc[500] textObject[c4d.PRIM_TEXT_TEXT] = bc[500] c4d.EventAdd() if __name__=='__main__': main(doc)
  • Rotating Spline Points

    Cinema 4D SDK s22 python sdk
    8
    0 Votes
    8 Posts
    2k Views
    ?
    @nophoto Very nice! Thank you
  • Setting up ObjectData plugin priority in Python

    Cinema 4D SDK python sdk
    3
    0 Votes
    3 Posts
    819 Views
    M
    Hi @Eduardo-Oliveira first of all welcome on the PluginCafe community. I think @zipit already provided you some correct answers or at least point you that this workflow is kind of strange for a Cinema 4D user since normally the object by itself doesn't really set its own position, but it's up to a tag (constraint Tag) to define the object position to another one. But in case you really want to do it, doing it in the Execute method of your ObjectData is fine. def AddToExecution(self, op, list): list.Add(op, c4d.EXECUTIONPRIORITY_GENERATOR, c4d.EXECUTIONFLAGS_CACHEBUILDING) return True def Execute(self, op, doc, bt, priority, flags): op.SetMg(doc.GetFirstObject().GetMg()) return c4d.EXECUTIONRESULT_OK You also need to ensure you registered your object with the flag c4d.OBJECT_CALL_ADDEXECUTION so AddToExecution and Execute are called. Cheers, Maxime.
  • 0 Votes
    18 Posts
    3k Views
    ManuelM
    hi, back to the subject, i was tracking the bug and I discovered it was on my chair. After messing around too much about the code, I was doing something very wrong. when you register your scenehook what is the level ? (last parameter of RegisterSceneHookPlugin) Cheers, Manuel
  • Copying Layers along with Objects

    Cinema 4D SDK c++ r20 sdk
    6
    0 Votes
    6 Posts
    936 Views
    D
    @Cairyn Thanks again! That's what I was afraid of, but thanks for the information!
  • First time compiling of plugin with R21

    Cinema 4D SDK r21 c++ sdk
    5
    3
    0 Votes
    5 Posts
    1k Views
    P
    Yes, I must read the manuals more throroughly (RTFMS). Excuses: it is so much and I just wanted to compiler R20 in R21. But you are correct. BUT, adding iferr to the code worked, AND also solved the other issue. Everything is working now! Thanks!
  • 0 Votes
    15 Posts
    2k Views
    M
    Looking at the doc in R19: [image: 1586334998271-5fdf5fb0-1327-4589-b6b6-d68af8869c11-image.png] [image: 1586334983049-821d97fa-e103-4cca-84b1-85f0f50304f0-image.png] So I'm afraid there is no simple solution that will work on each version maxon::String being introduced in R20, you will need to adapt your code. Cheers, Maxime.
  • 0 Votes
    4 Posts
    537 Views
    M
    Hi Pim sorry for the late reply, this is possible by using the lib_py.h (typically this is somehow what we used before R20 to expose feature in python, but it's way elder, not everything is possible to do, you have less control than with the new python.framework, and the lib_py.h is not maintained (so don't expect any enhancement in it) Only the python.framework will be enhanced. // Init Python GePython pythonScope; pythonScope.Init(); // Acquiere the GIL GePythonGIL gil_state; pythonScope.SetNode("doc", doc); // If doc->GetFirstObject() is nullptr, op variable will not be declared in the python scope, and you cant add a None. pythonScope.SetNode("op", doc->GetFirstObject()); maxon::String pythonCode = "\ import c4d\n\ \n\ def main():\n\ print(doc, op)\n\ \n\ if __name__ == '__main__' :\n\ main()\n\ "_s; StopAllThreads(); pythonScope.Run(pythonCode); Cheers, Maxime.
  • SDK example CommandLineRendering

    Cinema 4D SDK r20 c++ sdk
    3
    0 Votes
    3 Posts
    538 Views
    P
    Ok, thank you. I should have spotted that myself. -Pim
  • 0 Votes
    4 Posts
    1k Views
    ManuelM
    Hi, I often use the python generator to create some prototype myself. So it's ok for me. But if you want to give or sell your result, you should move to a plugin. It's not hard at all, if you already did that prototype, the plugin is easy, and we are here in case you have some issue. Nice result Cheers, Manuel
  • 0 Votes
    16 Posts
    3k Views
    P
    @r_gigante said in attribute 'nodiscard' requires compiler flag '/std:c++17': Well @pim , that's indeed the issue. Sticking to the recommended IDE is always recommended. Indeed going back to VC++2015 solved the issues. But now I have problems with the python.framework. See https://developers.maxon.net/forum/topic/12439/reading-script-file-into-memory/8
  • VoxelizationInterface

    Cinema 4D SDK r20 sdk c++
    10
    0 Votes
    10 Posts
    2k Views
    N
    Thank you Manuel !! this is exactly what I was looking for