• 0 Votes
    3 Posts
    626 Views
    S
    @i_mazlov sorry I thought I deleted this post as I solved the issue. Anyway to anyone who stumbles upon this question here's how I solved it: for i,pt in enumerate(points_list[::-1]): off = c4d.Vector(distance * i,0,0 ) mg = pt.GetMg() mg.off = off print(rotation.x) rm = c4d.utils.HPBToMatrix(rotation) pt.SetMg(mg * rm) So basically if the objects are inserted in the hierarchy and you start from the last one with the transformations this will work just like in the OM.
  • Icons reuse

    Cinema 4D SDK windows 2024 python
    3
    0 Votes
    3 Posts
    630 Views
    DunhouD
    Hi @ferdinand , Thanks for your explain, I would convert the svg files to png then regist them for a temp solution, and wait the attribute valid in python. Thanks always for your awesome works. Cheers~ DunHou
  • Check the state of record modes with python?

    Cinema 4D SDK 2024 python
    2
    0 Votes
    2 Posts
    478 Views
    B
    ah ok I figured it out. its possible to check those with the c4d.IsCommandChecked() function.
  • 0 Votes
    6 Posts
    3k Views
    G
    I apologize for posting repeatedly. I think I succeeded in installing numpy and other libraries as well. In case for someone in same situation, I would like to share my own case resolution. After installing pip, not from c4dpy, but using the python below worked: /Applications/Maxon Cinema 4D 2024/resource/modules/python/libs/python311.macos.framework/python and executed the command like python -m pip install numpy normally. And worked inside C4D properly. If there are any inaccuracies or clear errors, I would appreciate it if you could point them out. Thank you in advance.
  • Colorchooser in 2024

    Cinema 4D SDK 2024 python
    2
    0 Votes
    2 Posts
    428 Views
    M
    Hi @mikeudin thanks a lot for the report, this is a regression due to a last minute optimization within the internal Python API parsing done for which bring around 20% performance boost of the Python Effector in 2024.0. So any other classic API (c4d module) previously accepting a maxon.Vector or maxon.Color/A as an argument will be impacted (only ColorSwatchGroup.SetColor and ColorSwatchGroup.AddColor are affected by these changes) With that's said I was never a big fan of mixed datatype from classic API and maxon API, so even if this is a regression I think I prefer the new behavior. I will discuss that internally and see what is the outcome. I will keep you posted. Cheers, Maxime.
  • 0 Votes
    3 Posts
    694 Views
    H
    Hi @ferdinand, ah okay I see. Some part of me already suspected it could be a bug. Thanks for taking the time to look into it. Regarding the scope of question. You are absolutely right. And while I understand that it can make answering branching questions hard, it is sometimes not that easy to split things up. But all good, no offense taken. One last thing, I know you guys are not here to develop solutions or come up with algorithms. Still, I was wondering if a possible solution could be to move the selected points to a custom vector position and afterwards simply send an "Optimize" modeling command? Cheers, Sebastian
  • 0 Votes
    5 Posts
    739 Views
    M
    Hi just to let you know that with the release 2024.2 the issue have been fixed and it is now possible to retrieve the value of a Vertex Color Tag in point mode. Cheers, Maxime.
  • 0 Votes
    2 Posts
    446 Views
    ferdinandF
    Hello @LingZA, Thank you for reaching out to us. Thank you for posting your solution, much appreciated! I have provided below a variant of your example which without having the C++ Example Pick Object Tool installed. In case someone is wondering how to find out such a thing, you would have to look into the description of a tool, e.g. the extrude tool ... toolextrude.res: CONTAINER xbeveltool { NAME xbeveltool; GROUP MDATA_BEVEL_GROUP_OPTION { DEFAULT 1; LONG MDATA_BEVEL_MASTER_MODE // ... } INCLUDE ToolBase; // Includes the gadgets that are common to all description tools. } to find out that they all include all ToolBase which then looks like this: toolbase.res: CONTAINER ToolBase { NAME ToolBase; GROUP MDATA_MAINGROUP { DEFAULT 1; } GROUP MDATA_COMMANDGROUP { DEFAULT 1; GROUP { // SEPARATOR { LINE; } BOOL MDATA_INTERACTIVE { } SEPARATOR { } GROUP { COLUMNS 2; DEFAULT 1; BUTTON MDATA_APPLY { FIT_H; } BUTTON MDATA_NEWTRANSFORM { FIT_H; } } } } SUBCONTAINER ID_SNAPSETTINGS { } } Cheers, Ferdinand Code: """Actives and runs the extrude tool. """ import c4d ID_EXTRUDE_TOOL: int = 1011183 def main() -> None: c4d.CallCommand(ID_EXTRUDE_TOOL) tool = c4d.plugins.FindPlugin(ID_EXTRUDE_TOOL, c4d.PLUGINTYPE_TOOL) tool[c4d.MDATA_INTERACTIVE] = True c4d.EventAdd() if tool is not None: c4d.CallButton(tool, c4d.MDATA_APPLY) c4d.CallButton(tool, c4d.MDATA_NEWTRANSFORM) c4d.EventAdd() if __name__ == '__main__': main()
  • How to hide object local coordinates

    Cinema 4D SDK python
    5
    1
    0 Votes
    5 Posts
    1k Views
    i_mazlovI
    @chuanzhen , Sorry for the delayed answer. The layer.locked behavior is integrated deeply in the internal code of cinema bypassing common cinema pipelines. Unfortunately, there's no good way to imitate such behavior without using layers. In case you decide to proceed with the layer approach, there's an example in github repo highlighting the usage of SetLayerData() function: layer_creates_r13.py. Cheers, Ilia
  • some icon index not find

    Cinema 4D SDK python
    3
    1
    0 Votes
    3 Posts
    470 Views
    chuanzhenC
    @ferdinand Thanks
  • TimeLine Window Custom open

    Cinema 4D SDK 2024 python
    7
    2
    0 Votes
    7 Posts
    1k Views
    chuanzhenC
    @kangddan @Dunhou
  • Spline Round Tool behave issue

    Moved General Talk python 2024
    6
    1
    0 Votes
    6 Posts
    1k Views
    ferdinandF
    Hey @baca, Just as an FYI, this bug has been fixed and it will be included in one of the upcoming releases of Cinema 4D, quite likely the next release. Cheers, Ferdinand
  • how to program plugins with python?

    Cinema 4D SDK r25 python
    20
    0 Votes
    20 Posts
    6k Views
    love_me_renderL
    Hi, thank you for the tips. Here is my C++ -treegenerator-plugin, written for R25: http://www.klausfilm.bplaced.net/TreeGenerator/Website_Treegenerator.html Cheers Klaus
  • 0 Votes
    6 Posts
    1k Views
    bacaB
    @ferdinand said in c4d.MCOMMAND_EXPLODESEGMENTS makes target object dead: Select 0th polygon in a mesh. SMC: MCOMMAND_SELECTCONNECTED SMC: MCOMMAND_SPLIT Delete the selected polygons. When no polygons are left, exit, otherwise goto 1. Oh, great idea. Not that elegant, but seems legit. Thanks again.
  • Running commanline application with Python

    Moved General Talk 2023 python macos windows
    15
    0 Votes
    15 Posts
    4k Views
    ferdinandF
    One last thing: Have you tried using LICENSEMODEL::MAXONAPP as an alternative login method? ::MAXONACCOUNT is being deprecated as I said, and I do not quite remember why we chose it here nonetheless. User support surely can help you with the details here.
  • How to control a posemorph tag

    Cinema 4D SDK python
    4
    1
    0 Votes
    4 Posts
    899 Views
    M
    thanks a lot, your post is working for me.
  • 1 Votes
    3 Posts
    645 Views
    moghurtM
    @m_adam m_adam resolved the issue perfectly. Thanks for the great support!
  • 0 Votes
    5 Posts
    996 Views
    i_mazlovI
    Yes, you found the thread about point selection just right!
  • 0 Votes
    6 Posts
    956 Views
    DunhouD
    Thanks for that @ferdinand @m_adam , yes, Ferdinand is right, Maxime's point is too "pro" for me, and with some maxon decorators I never used in some way mess me up, with Ferdinand's "rookie" like explain that I can understand this more, thanks for your both respected work. Cheers~ DunHou
  • 0 Votes
    3 Posts
    572 Views
    M
    Hi @ll2pakll, I am glad that you solved your issue. Message(c4d.MSG_UPDATE) is indeed required to finalize your spline editing. If you want a complete example on spline editing please take a look at geometry_splineobject.py example. Cheers, Maxime.