• Coding a Python Plugin for fields

    Cinema 4D SDK python r20 windows
    4
    0 Votes
    4 Posts
    1k Views
    D
    @s_bach I was beginning to wonder if I was beating my head against a brick wall. Apparently so. Thanks so much for alleviating the pain! Well, I learned quite a bit about Python in the process so not really a loss. Guess I'll try moving on directly to the C++ version.
  • 0 Votes
    5 Posts
    4k Views
    P
    Thank you all, great answers! I will take a different approach. I convert the circle to a spline and then divide that spline into the wanted number of points. -Pim
  • Underlying of "doc" and "op" ?

    Cinema 4D SDK
    8
    0 Votes
    8 Posts
    3k Views
    eZioPanE
    @c4ds, don’t worry! Every steps (even the off-road one) make some progress, right? I appreciate the way you focusing on the problem solving, which I believe is also the wonderful thing of this forum: we do our best to solving the problem itself, discussing about the better/more accurate answers rather than “who is right, who is wrong”. Last but not least, thank you for taking time to reply!
  • Checking Keyframe curve type

    Cinema 4D SDK python r19 windows sdk
    2
    0 Votes
    2 Posts
    771 Views
    S
    Hello and welcome, what exactly do you mean with "export keyframe data"? Do you want to write data into a file? The best way to develop such code would be in a Python script that you can edit and execute in the Script Manager. A XPresso Python node is meant to contain code that is executed as part of XPresso to define the behavior of the XPresso network. A XPresso Python node should not be used to modify the scene or to perform I/O operations. A CTrack object stores the DescID of the associated parameter. You can access that DescID with GetDescriptionID(). Alternatively you can use BaseList2D.FindCTrack() to search for the CTrack associated with a certain parameter DescID. You find an example on GitHub. You find general information on how to use CTrack and DescID also in the C++ documentation: CTrack Manual DescID Manual best wishes, Sebastian
  • getting 3D noise values

    Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    2k Views
    R
    Thanks @eziopan and Sebastian for your answers ! So far I searched a way for getting values out of the 3D noise shaders. Starting point was the c4d.BaseShader class but it seems to me that accessing these shaders in order to get noise values is much more cumbersome than using the C4DNoise class and specifying the corresponding noise type as parameter 't' - as @eziopan has pointed out. So: thank you - problem solved ... and sorry, I haven't read the Q&A system thoroughly enough - next time I will mark my post properly. cheers, Jens
  • Some suggestions about Python SDK

    Cinema 4D SDK
    5
    6
    0 Votes
    5 Posts
    2k Views
    r_giganteR
    Hi Mike, please check this thread to properly use the Q&A functionality. Cheers, Riccardo
  • Coding a Python Field

    Moved Cinema 4D SDK
    5
    0 Votes
    5 Posts
    2k Views
    M
    Hey @darrellp as you figured out, it was not on the correct category. But in any case don't worry, maybe I was too harsh and unprecise, I'm sorry about that but in the end, as I said, you are new here, so don't worry if you break the posting rules the first times
  • 0 Votes
    4 Posts
    2k Views
    A
    For anyone who would like to use or learn from the script. You can download full script from github. ( Get And Copy Textures From Texture Tags )
  • 0 Votes
    4 Posts
    2k Views
    M
    You have to declare hdrs as a member variable. See 9.3.5: https://docs.python.org/2/tutorial/classes.html
  • How to use c4d.utils.PolygonReduction

    Moved Cinema 4D SDK r19 python
    5
    0 Votes
    5 Posts
    2k Views
    R
    Thank you! This is so much clear now
  • Change plugin folder cinema4d R19

    Moved Cinema 4D SDK r19 python
    2
    0 Votes
    2 Posts
    2k Views
    a_blockA
    Hi, I have turned your thread into a question, see Q&A New Functionality. Also moved the thread to the category Cinema 4D Development. In Cinema 4D R19 you can use the environment variable C4D_PLUGINS_DIR to set another path for plugins. It may even contain multiple directories (separated by semicolon ; ), although there was a bug in the early versions of R19, which prevented this. The bug was fixed with R19 SP2. There's an old thread discussing this, where you can also see how it's used: C4D_PLUGINS_DIR Multiple path Admittedly the original poster still seemed to have issues with mutiple paths, which we have not been able to reproduce, though. In Cinema 4D R20 this was changed completely. There you have multiple options: Multiple plugin directories can be set in Cinema's preferences g_additionalModulePath environment variable Additional plugin directories can be specified on command line Cinema4D.exe g_additionalModulePath=... See also Environment Variables in the user help and also the thread Is C4D_PLUGINS_DIR env var still working (R20.0.28)?. Cheers, Andreas
  • 0 Votes
    7 Posts
    2k Views
    chuanzhenC
    @m_adam Wow, I learned some tricks from your code! ( so important to me) Thank you very much for your optimization and testing of your personal time, which is very helpful to me! (C++ is so fast)
  • Modular plugin programming

    General Talk python
    6
    0 Votes
    6 Posts
    3k Views
    S
    Hello, you might have to add the pyp file path to the system path using: sys.path.append(os.path.dirname(__file__)) so import sys import os sys.path.append(os.path.dirname(__file__)) import hello_function best wishes, Sebastian
  • Move an object in hierarchy

    Moved Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    2k Views
    a_blockA
    Hi, both answers already provide valid solutions. Nice. @Rage: Please also consider to use the tagging system (see Read Before Posting) and the Question and Answer feature (see Q&A New Functionality). Especially the tags can help, like for example in this case @mp5gosu would probably have provided you with Python code, if the respective tag was set. Besides setting tags and changing into a question, I have also moved this thread into the Cinema 4D Development category. And then I want to add a few links to Python docs: GeListNode CallCommand() Cheers, Andreas
  • Is C4D_PLUGINS_DIR env var still working (R20.0.28)?

    General Talk r20 python
    2
    0 Votes
    2 Posts
    3k Views
    S
    Hello, in Cinema 4D R20 the environment variable C4D_PLUGINS_DIR has been removed. It has been replaced with g_additionalModulePath. You can use this command also as a command line argument. See Environment Variables. Please notice that you can mark your post also as a question. See Q&A New Functionality. best wishes, Sebastian
  • Python Script Gui: Use EditSlider Get Float

    Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    2k Views
    M
    Hi, @mike if the previous post solves your issue, please mark it as the correct answers. It will switch the topic as solved. To do so please read Q&A functionality. Of course, if you didn't test my previous post, or may have follow-up questions, do not mark as solved and take as much time as you need to ask us. But if there is nothing more to add please mark your topic as solved. Cheers, Maxime
  • 0 Votes
    7 Posts
    2k Views
    T
    @mp5gosu Thank you, that is a good tip. I see that Onull=5140 is listed and it looks like all others are in there too! Thom
  • Mosplines - Iterate Width

    Moved Cinema 4D SDK python
    14
    0 Votes
    14 Posts
    4k Views
    a_blockA
    Hi, I'm sorry for getting back so late. My examples should be easily adapted to random values. Our Python SDK does not directly provide means for random numbers, but Python's random module should do the trick just fine. Cheers, Andreas
  • Modify Sketch&Toon Rendersettings

    Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    1k Views
    Y
    Hi Holger, I'm wondering if your question has been answered. If so, please mark this thread as solved. Cheers, Yannick
  • Simple Box Gui Creation

    Cinema 4D SDK python windows r19
    9
    0 Votes
    9 Posts
    3k Views
    B
    @a_block Case solved! Thanks again for your patience.