Group Details Private

Global Moderators

Forum wide moderators

  • RE: Clicking Group Children Causes Bitmap to Redraw Incorrectly

    Hi @blastframe, Thanks for reporting the issue.
    Actually it's very similar to R21 GeUserArea in docked GeDialog behaves differently but as stated to the other topic, I don't have any news on that, I will bump development team again.

    So not the safest but as a workaround ignore the x,y, x2, y2 passed and draw with the data you defined in GetMinSize.
    Of course, this has the limitation that scroll groups are not anymore supported, but its the only workaround I see for the moment.


    posted in Cinema 4D Development
  • RE: Ptex Shader Progress

    Hi @wuzelwazel, thanks a lot for sharing your progresses on the Ptex Shader and for sharing your code.

    I've moved the thread to the more appropriate "General Programming & Plugin Discussions" hoping other developers could contribute to the discussion.

    Cheers, Riccardo

    posted in General Programming & Plugin Discussions
  • RE: Create VRay material


    sorry, but this it NOT how to create a "c4d material".

    Cinema 4D has multiple, different materials. All materials are based on BaseMaterial. Thus, any material can be created using the c4d.BaseMaterial constructor and the appropriate ID:

    # create Cheen material
    material = c4d.BaseMaterial(c4d.Mcheen)

    The Cinema 4D standard material is a special case. It can be created using BaseMaterial . But there is also a dedicated class, that can be used as well: c4d.Material.

    # create standard material
    material = c4d.BaseMaterial(c4d.Mmaterial)
    material.SetName("first material")
    # create standard material the other way
    material2 = c4d.Material()
    material2.SetName("second material")

    To create a VRay material, you need the ID of that material to use it with c4d.BaseMaterial. I don't have VRay here, but you can easily obtain that ID from a already created material using GetType().

    # get the currently selected material
    mat = doc.GetActiveMaterial()
    if mat is not None:
        # print type ID

    You find more information in the C++ docs: BaseMaterial Manual

    best wishes,

    posted in Cinema 4D Development
  • RE: Remove Stray ShowPopUpDialog?

    Hi @bentraje can you share your code?

    I will say it really probably that you call ShowPopupDialog on any BFM_INPUT event and not to an enough specific one.

    posted in Cinema 4D Development
  • RE: C++ Shader Plug-In Best Practices


    thanks @PluginStudent for the answer here :)

    if (obj != nullptr)    // If I'm checking for nullptr could I just use if(obj) as in Python?

    The correct way is to check against nullptr, that's a c++11 standard.
    if (obj) could lead to false positive and bugs.

    String is not the same thing as maxon::String. String is the classic API while maxon::String is the Maxon API. You can read more about that in the manual about strings

    Error handling is super eady to use, we got every thing to do so, you should definitely use it. Check Our manual about Error Handling

    Last but not least you can probably use our Url class to handle file or filename. Give it a look


    posted in Cinema 4D Development
  • RE: Custom Tokens with Team Render Server

    @fwilleke80 Yes or the RenderData but that means the data needs to be there before the token evaluation which is done before any scene execution render wise.


    posted in Cinema 4D Development
  • RE: Script to center axis but have Y axis 0, or bottom of model

    hello and welcome to this forum.

    For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here.

    I've added the tags and marked this thread as a question so when you considered it as solved, please change the state :)

    About your question :

    The problem with your code is that you are opening a dialog box but you can't interact with it. (as most dialog box)

    Using CallCommand are cool and sometimes useful but in many cases you will find yourself in a dead end. (and pretty fast)
    A better approche is to use the Maxon API and read our documentation. You will also find a lot of example in our github repository.
    We have some manuals also. They are a nice way to start.

    That said, how can you handle this problem ?

    In Cinema 4D you can "move" the axis. You have to move the points.

    To know where a point is, c4d need two things. The matrix's object and the local coordinate of the point. If you open your structure's tab you will see that how ever the object's position is, the coordinate of the points doesn't change.
    As you can find using the search tool, you are not the first to ask that question :)
    You have to move the axis where you want it, and update the points position (so visually they don't change).
    This is often done by converting the local coordinates to global and the inverse.

    Last but not least, Maxime have create a pretty complete example that do exactly what you need.
    You can find it here
    It can be scary if you are new to the world of development you will do that kind of stuff in no time.

    Don't be afraid to ask questions here. We are here to help.


    posted in Cinema 4D Development
  • RE: Custom Tokens with Team Render Server

    Hi, unfortunately, there is an issue in the Team Render Server that prevents your script to work were to speed up things on the team render side only render data are loaded first to setup stuff like filename.

    Nothing that you can fix on your side.

    I've opened a bug report about it.

    I will keep you in touch.

    posted in Cinema 4D Development
  • RE: C++ Shader Plug-In Best Practices


    Loading your texture in your InitRender function is a good approche.
    The Output function is called for each pixel in the scene, you should avoid calculation/process as much as possible to avoid your render time to be too slow.

    About how to create such a shader i'm afraid we are somehow a bit limited in that area (in the SDK team i mean)

    Be sure to handle the message MSG_GETALLASSET properly. This will allow the texture to be collected if needed.

    If you have more specific questions, we can probably ask the dev team.

    About the modern c++ question we don't have too much about this in our documentation :


    posted in Cinema 4D Development
  • RE: COLOR Constants Guide & Documentation Error


    thanks for sharing this with the everybody.

    COLOR_TIMELINE is now EX_COLOR_TIMELINE the documentation will be updated to reflect that change.


    posted in Cinema 4D Development