• Object Target Expression in Python

    Moved Cinema 4D SDK
    8
    0 Votes
    8 Posts
    3k Views
    a_blockA
    Hi, unfortunately we can't help developing algorithms. So, what has been said here and in the Quaternion Rotation thread, is probably all we can contribute from MAXON's side. Maybe somebody from our community is willing to step into this and help out? Cheers, Andreas
  • 0 Votes
    3 Posts
    969 Views
    P
    Thank you! In future I will set the tags.
  • ReferenceError?

    Moved Cinema 4D SDK python
    6
    0 Votes
    6 Posts
    2k Views
    a_blockA
    Hi, first of all thanks to @Cairyn for nice explanations and helping in solving this. I'd just like to add a link to one of our examples, pretty much demonstrating this workflow: mengersponge.py (plus the scene file). @Jvos : I hope you don't mind, may I ask you to please open a new topic for unrelated topics/questions. I have also moved this thread into the Cinema 4D Development category, added some tags and turned the thread into a question. Cheers, Andreas
  • Sampling the falloff of a mograph effector? (python/R19)

    Cinema 4D SDK
    4
    0 Votes
    4 Posts
    2k Views
    jenandesignJ
    @m_adam Wow, this is truly great. What a fantastically written response, I really appreciate it! Learning a bunch from this example, way more than I asked for. Thanks again Jenny P.S. if only the py4d documentation had examples like this, we would all be better programmers
  • R20 Alembic Export Crash

    Cinema 4D SDK
    5
    0 Votes
    5 Posts
    2k Views
    R
    Ah I think you're right - I take the object right from the document without a clone or anything. Thank you!
  • Get userdata Button state on object in Python tag

    Cinema 4D SDK python r20
    7
    0 Votes
    7 Posts
    3k Views
    B
    Ah! So event_data['msg_data']['id'] is the id of the userdata. Didnt read your code comments Thanks alot! Regards Bonsak
  • C4D GUI Python Callback

    Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    2k Views
    Y
    Hi, A string with format "PLUGIN_CMD_123456" is meant to be used with MENURESOURCE_COMMAND, not RegisterCommandPlugin(). It tells Cinema the command ID and name for the menu item to be added. Note the sub-IDs returned from GetSubContainer() are specific to a command and aren't global to Cinema. Maybe CommandData isn't what you really need. Scripts from the user folder are automatically loaded and can be added to any menu using Customize Menus dialog.
  • 1 Votes
    5 Posts
    2k Views
    bnsB
    @m_adam thanks for R23.110 C4DPYTHONPATH37 !
  • 0 Votes
    3 Posts
    934 Views
    B
    Awesome! Thanks. Regards Bonsak
  • No fbx exporter in python library?

    Cinema 4D SDK r20 python
    2
    0 Votes
    2 Posts
    1k Views
    Y
    Hi Rage, Unfortunately several importers and exporters do not have a constant for their ID. This is the case for FBX. The ID for the FBX exporter is 1026370. To find the ID of a specific exporter you can use the following code: import c4d saverPlugs = c4d.plugins.FilterPluginList(c4d.PLUGINTYPE_SCENESAVER, True) for plug in saverPlugs: print('{} : {}'.format(plug.GetName(), plug.GetID())) I turned the topic into a Q&A. Please remind to use this feature of the forum.
  • n-gones with python

    Moved Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    1k Views
    Passion3DP
    Hi @eZioPan thank you for this example very clear
  • ParseTupleAndKeywords in R20

    Cinema 4D SDK c++ r20 python
    5
    0 Votes
    5 Posts
    2k Views
    V
    @y_puech said in ParseTupleAndKeywords in R20: Hi Victor, There's a logic error in the code you posted from the first post. The condition for R20 if (str.IsEmpty()!=false) returns false if the string has content. It makes more sense to call IsPopulated() for the R20 code instead of IsEmpty(). You are right, thank you!!!
  • Pointcount from bevel deformer

    Moved Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    2k Views
    B
    Sorry
  • 0 Votes
    3 Posts
    2k Views
    eZioPanE
    @s_bach, thank you, I'll start to do some hard reading!
  • 0 Votes
    4 Posts
    1k Views
    P
    @s_bach said in Which message do I receive when a command plugin dialog is closed?: DestroyWindow Thanks. By the way, compliments on the latest R20 C++ manual. It is great!
  • resource errors with SPLINE in R20

    Cinema 4D SDK python r20
    4
    1
    0 Votes
    4 Posts
    1k Views
    Y
    Hi, Are you using the Spline GUI inside a dialog? It looks like so if there's no arrow. If that's the case you can call SetLayoutMode(c4d.LAYOUTMODE_MINIMIZED) on the Spline custom GUI to change its layout to the minimized/spline element only.
  • 0 Votes
    4 Posts
    2k Views
    B
    @eziopan Thanks mate. It works as expected. @a_block Thanks. Will double check next time.
  • deformer object priority

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    2k Views
    M
    Thank you for your answer!@m_adam Although object go back normal after i clicked 'Redraw' (I guess that's the reason),it isn't make sure problem is 'refresh the viewport'. 'refresh the viewport' can also fix Priority error result . 'Shift Priority Tag' just effective Expression.It can't help. After asking questions,i try to use Python Tag to replace 'Spline Deformer Object' ,because Python Tag have Priority.Fortunately,even though it looks very complicated, but everything become ok!
  • Print console logs in terminal

    Moved Cinema 4D SDK python r20
    5
    0 Votes
    5 Posts
    2k Views
    Y
    Hi, As I turned this discussion into a Q&A topic, if you're satisfied with my last post's solution then you can mark it as the correct answer or mark the topic as solved. For more information see Q&A New Functionality.
  • read active render data

    Cinema 4D SDK python
    2
    0 Votes
    2 Posts
    720 Views
    S
    Hello and welcome, when creating a new post, please use tags and the Q&A system. See Read Before Posting. I tried your code in a R20 script and it seems to work perfectly fine: rd = doc.GetActiveRenderData() if rd is None: return fromSlice = rd[c4d.RDATA_FRAMEFROM] toSlice = rd[c4d.RDATA_FRAMETO] fps = doc.GetFps() print(fromSlice.GetFrame(fps)) print(toSlice.GetFrame(fps) What exactly is not working for you? In what context do you execute your code? best wishes, Sebastian