• Set Track Data Method?

    Cinema 4D SDK r21 python
    4
    0 Votes
    4 Posts
    392 Views
    B
    @zipit @m_adam Apologies for the late response. Thank you for the confirmation both. I will close this for now.
  • Change Color of Hyperlink Customgui

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    661 Views
    lasselauchL
    Okay! Thanks for the info @m_adam ! Oh, and on macOS it is General - Text - Flag Edit Saved [image: 1586176239242-bildschirmfoto-2020-04-06-um-14.28.13.png] ¯_(ツ)_/¯ Cheers, Lasse
  • Python Plugin Unicode Convert

    General Talk python
    4
    0 Votes
    4 Posts
    832 Views
    M
    Just to add on top, os.path.listdir and os.path.join in python 2 are context-specific, so if you input a Unicode string it will output a Unicode string, if you input a regular string it will output a regular string. Now the culprit is on c4d.documents.MergeDocument because normally this method accepts a C++ Filename object (which is the Classic API that under the hood uses the new MaxonAPI maxon::Url). Unfortunately, the Python parser is not able to convert from a Python Unicode string to a C++ Filename, but only from a Python ASCII string to a filename. So indeed casting from Unicode string to ASCII is the solution. Cheers, Maxime.
  • How about updating ResEdit..?

    Cinema 4D SDK
    2
    0 Votes
    2 Posts
    606 Views
    M
    Hi @lasselauch there is actually no plan to update ResEdit. There is the R20 Resource Editor but for the moment it's only for Node stuff. Cheers, Maxime.
  • Python Generator - Adding Shaders to Deformer Objects

    Cinema 4D SDK python
    11
    0 Votes
    11 Posts
    2k Views
    M
    @mp5gosu Ah brilliant. Thanks for that! And apologies for being such a noob at this.
  • 0 Votes
    7 Posts
    811 Views
    ManuelM
    @mp5gosu thanks for the addition. Cheers, Manuel
  • Using Python Node to Traverse Deep Hierarchy... fail

    Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    1k Views
    N
    Ah, you probably expect the toroids to also rotate around their own axis exactly. Thanks
  • Python Generator - Accessing Contour Spline

    Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    551 Views
    M
    Thanks again @PluginStudent for helping me so quickly. That was enough information to help me find the .MakeUserSpline function that allows me to do exactly what I'm after: MakeUserSpline('sin(x * PI)', 5) More info here for anyone looking. Cheers, Jamie
  • 0 Votes
    3 Posts
    662 Views
    N
    @m_magalhaes Oh man... thank you so much. Even when I read your reply, I couldn't "see" it in the Node... was staring at it for to long. thanks.
  • 0 Votes
    6 Posts
    1k Views
    M
    Oops - I forgot to have the following line: myDefObj[c4d.FIELDS] = myFieldList It all works perfectly now. Thanks again for your help @PluginStudent
  • Texture renaming

    Moved Cinema 4D SDK python
    16
    0 Votes
    16 Posts
    3k Views
    M
    @zipit hm yes this sounds too complicated overall, particularly point 3 there could so much happen on the os side. A gui with more options like renaming the hole texturename or a replace option of certain words could be the way forward. Instead of undo it would be easy then to rename the texture with he old name etc. for now im happy how this works and let this solved. Much Thanks! Cheers, moko
  • Modifying timeline marker's attributes

    Cinema 4D SDK
    5
    0 Votes
    5 Posts
    1k Views
    H
    Thanks for the drag'n'drop tip Maxime, that feature is extremely useful!
  • 0 Votes
    4 Posts
    508 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.
  • Passing a variable to the python script

    Cinema 4D SDK r20 c++ python
    5
    0 Votes
    5 Posts
    832 Views
    ferdinandF
    Hi, yeah like that. __name__ is just another module bound constant attribute. It is a dunder attribute, signaling a special importance, indicated by its double underscores, but that is only a convention and not a functionality. You can set __name__ to anything you like, just like you could set __author__ to your favourite ice cream brand. The convention dictates that __name__ tells the script in which context is being executed, where __main__ should signal that the module is executed directly. You could set it to my_cpp for example, so that your scripts could react differently to being executed from your C++ code. Cheers, zipit
  • 0 Votes
    3 Posts
    744 Views
    G
    Well Uh.....Yea.....Guess I should take a break......Thanks for the point out of the lower case b........ This is solved. Thanks Plugin Student! Cheers! MattG
  • Create a download progress bar in python

    Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    1k Views
    M
    @indexofrefraction and just in case you have this example from CUSTOMGUI_PROGRESSBAR if you want a more minimal script. Cheers, Maxime.
  • 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
  • Insert String Info Into AddStaticText dialog command

    Moved Cinema 4D SDK
    3
    0 Votes
    3 Posts
    627 Views
    G
    Thanks Maxime, understood on the rules and regulations, sorry about that. I understand the group concept now, read up more on it and I have a better idea on how to approach the goal I'm trying to get to. I have another error I'm getting but I'll try to do another post and see if I tag it right! Thanks for your time! Cheers! MattG
  • Can't work out BaseDocument.StartPickSession

    Cinema 4D SDK python r21
    7
    0 Votes
    7 Posts
    1k Views
    M
    Without a further reply from you until tomorrow I will consider and mark this topic as solved, but feel free to open it again if you have more information. Cheers, Maxime.
  • Extending the Command Line with Python

    Cinema 4D SDK python r21
    10
    0 Votes
    10 Posts
    3k Views
    moghurtM
    @jwzegelaar said in Extending the Command Line with Python: We found a good workaround! We now made a custom commandline plugin where we can add our own arguments. And it works great. If anybody in the future has this issue you can always contact us and we will help. Thanks again everybody for all the help! Hi jwzegelaar, I believe that I share the same needs as you, where I also need to pass in external parameters via a .py file to make modifications to the file before rendering. Unfortunately, I am encountering the same issue as you. Although this post has been quite some time, I am still hopeful for your assistance. Your help would be greatly appreciated and it is highly important to me.