• Volume Builder does not return object

    Moved Cinema 4D SDK python r20
    10
    0 Votes
    10 Posts
    3k Views
    M
    Hi @Swinn are you sure in your script you define in line 19/20 settings[c4d.VOLUMETOMESHSETTINGS_ISO] = -5.51 settings[c4d.VOLUMETOMESHSETTINGS_ADAPTIVE] = 0.0 With the same value, you got in your volume mesher object? The voxel range threshold can't be directly passed as an argument, but you can expand this parameter in the volume mesher and then you get the Use Absolute Value (ISO) check box, which let you choose an ISO value. Cheers, Maxime.
  • 0 Votes
    7 Posts
    2k Views
    eZioPanE
    Hi, @y_puech I may find a bug of the forum about "mark a post correct answer", discussion post here: Cannot mark post as answer Once this bug solved, I will re-edit this topic and posts correctly.
  • Setting Quicktime Options

    Cinema 4D SDK python r19
    6
    0 Votes
    6 Posts
    3k Views
    M
    Hi @dmp, sadly as you already figurate out datarate want a BytesValue, which is not yet implemented in the maxon API (as it's been said, currently the python maxon API is still on progress and they are some flaws or missings class like this one, which will be fixed in futures release). And I'm afraid there is no workaround for it except switching to C++. With that said. For all other parameters, maxon API also introduces some new types like maxon.Int (which point to maxon.Int64 if available or maxon.Int32). According your issue with custom samplerate and audio kilobitrate, only few values are accepted. MAXON_ATTRIBUTE(Int, AUDIO_SAMPLERATE, "net.maxon.mediasession.mf.export.audio.samplerate", RESOURCE_DEFINE(ENUM_32000, 32000) RESOURCE_DEFINE(ENUM_44100, 44100) RESOURCE_DEFINE(ENUM_48000, 48000)); MAXON_ATTRIBUTE(Int, AUDIO_KILOBITRATE, "net.maxon.mediasession.mf.export.audio.kilobitrate", RESOURCE_DEFINE(ENUM_96, 96) RESOURCE_DEFINE(ENUM_112, 112) RESOURCE_DEFINE(ENUM_128, 128) RESOURCE_DEFINE(ENUM_160, 160) RESOURCE_DEFINE(ENUM_192, 192) RESOURCE_DEFINE(ENUM_224, 224) RESOURCE_DEFINE(ENUM_256, 256) RESOURCE_DEFINE(ENUM_320, 320)); If you have any question left, please let me know. Cheers, Maxime.
  • R20 Startup script location - python_init.py

    Cinema 4D SDK python r20
    9
    1 Votes
    9 Posts
    4k Views
    T
    @m_adam said in R20 Startup script location - python_init.py: This will be fixed within a future release. Well, that's a relief then. Good to know. Thank you Maxime for the clarification. Kind regards, Tom
  • 0 Votes
    2 Posts
    1k Views
    S
    Hello, Set Driven Keys is just some workflow to create an Xpresso setup connecting two parameters. This has nothing to do with scripting or CallCommand(). Can you maybe explain somehow differently what you want to achieve? best wishes, Sebastian
  • Cannot update values of BaseContainer of VideoPost

    Cinema 4D SDK python r19
    5
    0 Votes
    5 Posts
    1k Views
    S
    Hello, I'm not really sure I understand what you are doing. Are you operating in a command line version of Cinema? Or is you code reacting to some command line arguments? Are you operating on the currently active BaseDocument? As I said, I don't have Indigo Renderer so I can't test this specific scenario. But when you "change" the renderer, you also have to "create" that renderer video post when operating in a new document. So it is not enough just to change the RDATA_RENDERENGINE parameter. This example shows how to set and create the "Hardware" renderer: renderData = doc.GetActiveRenderData() if renderData is None: return # set Hardware as active renderer bc = renderData.GetDataInstance() bc[c4d.RDATA_RENDERENGINE] = c4d.RDATA_RENDERENGINE_PREVIEWHARDWARE # add Hardware post effect # in Python a BaseList2D object must be created videoPost = c4d.BaseList2D(c4d.RDATA_RENDERENGINE_PREVIEWHARDWARE) renderData.InsertVideoPost(videoPost) c4d.EventAdd() You find general information on RenderData also in the C++ documentation: RenderData Manual. best wishes, Sebastian
  • Python SSL error

    Moved Cinema 4D SDK python r20
    9
    0 Votes
    9 Posts
    2k Views
    orestiskonO
    @m_adam Thanks Maxime, I'll check that out. The customer was using R23.110
  • R20 ignores language/stringtable

    Cinema 4D SDK python r20
    3
    0 Votes
    3 Posts
    1k Views
    eggtionE
    That's it! Thank you so much, mp5gosu! Cheers, Mark.
  • 0 Votes
    14 Posts
    4k Views
    Leo_SaramagoL
    Ok, I'll let you off the hook. I feel like I can pick from where the code is now and move on. I'm gonna set it to SOLVED. Thanks a lot for your time!!!
  • 0 Votes
    8 Posts
    2k Views
    a_blockA
    @mike No need to apologize, we are all new here. No worries. Especially during the starting phase of this new forum, we try to point even at small issues, hoping it will lead to a cleaner forum in future.
  • Copy color of a clone to an other clone

    Cinema 4D SDK python
    4
    1
    0 Votes
    4 Posts
    2k Views
    a_blockA
    Hi, just a small request from our side: Please do not cross post to different forums (this topic on CGSociety). Chances are, you'll make people work for you redundantly. Cheers, Andreas
  • Reading console output - possible?

    Cinema 4D SDK r20 c++ python
    11
    0 Votes
    11 Posts
    2k Views
    P
    I already guessed so. Thanks, I think we can close this post. -Pim
  • Viseme RIG test

    General Talk python
    6
    0 Votes
    6 Posts
    3k Views
    Leo_SaramagoL
    Hi! You could go for CTracks via Python. You'd have to get the track for a position parameter, for example, or create one, then get curve, then add keys. Later, you could simply range map it back to your Xpresso rig. it It's definitely doable!
  • R20 Script State Function

    Moved Cinema 4D SDK python r20
    7
    0 Votes
    7 Posts
    2k Views
    M
    Thanks a_block, Sadly I had to disable the state() function because it breaks (delays forever) Material Preview/Shader rendering. This State() function should somehow be isolated if possible ... but i guess this is the limitation of "checking the gui state". kind regards mogh
  • Add functions to python via C++ SDK [R20]

    Cinema 4D SDK c++ python
    4
    0 Votes
    4 Posts
    2k Views
    Y
    Hi Víctor, To retrieve parameters a function must be initialized with PYFN_FLAGS::KEYWORDS. Then use pylib.ParseTupleAndKeywords() to get the value for each parameter. The following code shows the implementation of a function which expects a string, an integer and a float: static _PyObject *extendpyapi_PassParameters(_PyObject *self, _PyObject *args, _PyObject *keywords) { PythonLibrary pylib; String str; Int32 integer = 0; Float real = 0.0f; const Char *kwlist[] = {"str", "integer", "real", nullptr}; if (!pylib.ParseTupleAndKeywords(args, keywords, "$if", kwlist, &str, &integer, &real)) return nullptr; if (str.Content()) GePrint("Parameter str: " + str); GePrint("Parameter integer: " + String::IntToString(integer)); GePrint("Parameter real: " + String::FloatToString(real)); return pylib.ReturnPyNone(); } ... moduleFunctions[1].Init("PassParameters", (PyFn)extendpyapi_PassParameters, PYFN_FLAGS::KEYWORDS, "PassParameters() - Extend Python API");
  • 0 Votes
    3 Posts
    2k Views
    Caleidos4DC
    Now Work Thanks Andreas
  • 2 Votes
    7 Posts
    5k Views
    a_blockA
    There is no way to get a filtered list of objects visible in the timeline. Sorry.
  • Removing color picker from ColorField

    Cinema 4D SDK python r20
    9
    1 Votes
    9 Posts
    2k Views
    M
    And sorry @kbar, @C4DS, @aturtur I should have found it earlier, but after looking at how to implement it, I figured out it's already possible since R21 with the flag DR_COLORFIELD_NO_SCREENPICKER import c4d class MyDialog (c4d.gui.GeDialog): def CreateLayout(self): self.AddColorField(1000, c4d.BFH_LEFT | c4d.BFV_TOP, colorflags=c4d.DR_COLORFIELD_NO_SCREENPICKER) return True if __name__=='__main__': global dialog dialog = MyDialog() dialog.Open(c4d.DLG_TYPE_ASYNC, xpos=-2, ypos=-2) Cheers, Maxime.
  • RemoveUserData does not fully remove User Data

    Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    2k Views
    D
    This worked. Thank you.
  • Render to texture for Cinema 4D

    General Talk
    2
    0 Votes
    2 Posts
    1k Views
    a_blockA
    Hi, congratulation to your first plugin. Looks nice! Cheers, Andreas