• Best way to fill a maxon::BaseArray

    6
    0 Votes
    6 Posts
    2k Views
    r_giganteR
    Unfortunately, differently from std lib where it's possible to define and init a vector pretty easily using one-line statement( std::vector<int> a (10, 100);) this looks like being not currently possible with maxon::BaseArray() and you need to make it the usual way. Best, R
  • Moving a Point Along an Arc by Distance from another Point

    7
    2
    0 Votes
    7 Posts
    2k Views
    ?
    @zipit My sincerest gratitude for your help. Not only did you get my project unblocked, but you answered my follow-up questions. I have learned a lot from you. Thank you!
  • How to fillet a ObjectData edge in Python?

    9
    1
    0 Votes
    9 Posts
    2k Views
    ?
    @zipit Absolutely incredible work! So elegant! Thank you very much @m_adam Thank you for the reply and confirmation!
  • R21 Project Tool?

    r21 c++
    7
    1
    0 Votes
    7 Posts
    1k Views
    B
    @Cairyn @zipit @m_magalhaes Thanks for the detailed response. After installing the C++ environments, it works as expected. Sorry new to this. As I only have python to reference for. I also managed to build the plug-ins using this guide: https://developers.maxon.net/forum/topic/10967/compiling-the-cinema-4d-r20-c-sdk-examples
  • How to load a file with python and turn it into the active document ?

    2
    0 Votes
    2 Posts
    1k Views
    C4DSC
    I have replied your post at C4DCafe. "The c4d.documents.LoadDocument returns you a BaseDocument, which you then need as argument for the InsertBaseDocument and SetActiveDocument."
  • How to decompile cdl64 file?

    9
    0 Votes
    9 Posts
    5k Views
    maxonM
    @trideshnik said in How to decompile cdl64 file?: Hmm.. so.. Comrades, before getting the necessary information, I was told 100500+ times about copyright. Everyone saw fit to indicate this. Dear, do you think that the person asking this question needs a triple copyright notice? If you do not want to answer or help, no one is forcing you, but making idiots out of people is bad form. I got a ton of off-topic information. reasoning, warnings. and only a fraction of the information I need. so nice. but. Thanks to those who indicated the direction in which to dig. P.S. it seems to me that this is such a lifestyle. okay) khkhgxghzhuxvvldqkdfnhuv This answer is considered irrespecutful and contradicts the collaboration spirit of the forum. User banned.
  • Possibility of using ExecuteSubID with ToolData.

    r21 c++
    2
    1
    0 Votes
    2 Posts
    673 Views
    r_giganteR
    Hi @Danchyg1337, thanks for reaching out to us. The approach you've pointed out can work to activate a ToolData with a specific preset. You've to register a CommanData for every preset you'd like your ToolData to use and, if needed, you can register your ToolData passing the PLUGINFLAG_HIDEPLUGINMENU to avoid that the generic ToolData appears among the menus. Best, Riccardo
  • Support of Scene Nodes development

    5
    1
    0 Votes
    5 Posts
    2k Views
    I
    @m_magalhaes said in Support of Scene Nodes development: @iluxa7k said in Support of Scene Nodes development: Several suggestions at c4d cafe forums, if will be time to read them Do you have any link for us ? I know that a couple of Maxon guys are already looking closely to that forum (and others) https://www.c4dcafe.com/ipb/forums/forum/289-scene-nodes-workflows-discussion/ https://www.c4dcafe.com/ipb/forums/topic/111961-nodes-road-map/?&page=5#comments https://www.c4dcafe.com/ipb/forums/topic/111939-maxon-announces-cinema-4d-r23-overview-discussion/?page=22&tab=comments#comment-721276
  • The slider tool returns False.

    r21 python
    2
    0 Votes
    2 Posts
    782 Views
    M
    Hi @x_nerve the ID used is not the correct one you should use: 431000021 for edge mode and 431000030 for point mode, unfortunately, there are no symbols for these tools. Cheers, Maxime.
  • Some attempts at nondestructive modeling

    Moved r21 python
    5
    1
    0 Votes
    5 Posts
    2k Views
    X
    Hi: After a trial run, the script was tested successfully. By setting the name suffix of Python Tag, the problem of repeated running of Tag can be solved. Taking c4d.DIRTYFLAGS_SELECT as an example, if the point, line, and surface selections change, it will execute, otherwise it won't. The Python script code is as follows: import c4d #e-mail: [email protected] def main(): Name = op.GetName() Objects = op.GetObject() Changed = Objects.GetDirty(c4d.DIRTYFLAGS_SELECT) Text = ["xit" + str(Changed)[-1]] if str(Name).count(Text[0][:-1]) != 0 : if str(Name).find(Text[0][:-1]) != str(Name).rfind(Text[0][:-1]) : if str(Name)[str(Name).rfind(Text[0][:-1]):] == Text[0] : if str(Name).find(Text[0][:-1]) <= 0: #Do not execute, exit the program. print ("Does not perform.") op.SetName(str(Text[0])) return else: #Do not execute, exit the program. op.SetName(str(Name)[:str(Name).find(Text[0][:-1])] + str(Text[0])) print ("Does not perform.") return else: if str(Name).find(Text[0][:-1]) <= 0: op.SetName(str(Text[0])) print ("Perform.") else: op.SetName(str(Name)[:str(Name).find(Text[0][:-1])] + str(Text[0])) print ("Perform.") else: if str(Name)[str(Name).rfind(Text[0][:-1]):] == Text[0] : #Do not execute, exit the program. print ("Does not perform.") return else: op.SetName(str(Name)[:str(Name).find(Text[0][:-1])] + str(Text[0])) print ("Perform.") else: print ("Perform.") op.SetName(str(Name) + str(Text[0])) print ("pass") #The next thing to execute.
  • c4dpy.exe asking for credentials?

    r21 python
    3
    0 Votes
    3 Posts
    597 Views
    M
    Hi @bentraje as you already figured out in the documentation for R21+ this is necessary because each version (c4dpy, CommandLine, TRS, TRC) now have their own preference folder and doesn't share anymore the one from c4d. Cheers, Maxime.
  • c4dtools alive?

    Moved
    3
    0 Votes
    3 Posts
    775 Views
    indexofrefractionI
    ok tx... It seems the old c4dtools were integrated into c4ddev sadly c4ddev is nothing for the occasional c4d python hacker .-) the "beginners guides" are on "todo" for years, now and probably wont get completed anymore. it does not look like Niklas is still engaged in the c4d world.
  • Maximize/Resize "Add Motion Clip" Window

    3
    0 Votes
    3 Posts
    924 Views
    Leo_SaramagoL
    @zipit Thanks!
  • Get Point Positions of Selected N-Gon or Polygon

    11
    0 Votes
    11 Posts
    4k Views
    X
    Hi: This is a bit of a hassle, but can still be scripted, who CARES about an extra polygon. import c4d def main(): polygons = op.GetAllPolygons() points = op.GetAllPoints() point = [c4d.Vector(10000, 10000, 10000),c4d.Vector(9999, 10000,10000), c4d.Vector(9999, 10000, 10001),c4d.Vector(10000, 10000, 10001)] point_indexe = [[len(points) + i ,point[i]] for i in range(len(point))] op.ResizeObject(len(points) + len(point),len(polygons) + 1) set_point = [op.SetPoint(k[0], k[1]) for k in point_indexe] op.Message(c4d.MSG_UPDATE) c4d.EventAdd() if __name__=='__main__': main()
  • Our plugin is not showing up on the menu in just a few cases.

    4
    0 Votes
    4 Posts
    1k Views
    r_giganteR
    Hi Fernando, feel free to have the developer writing directly to our sdk support email box. Best, R
  • Script : Harden edges of all UV borders (break Phong shading)

    6
    3 Votes
    6 Posts
    3k Views
    M
    Wow, very nice! There's a huge progress, it now works pretty fast. Thanks for adding the wishlist items.
  • Plugin OnFloor Final 1.2.4RC1

    14
    4 Votes
    14 Posts
    6k Views
    J
    Grand merci pour ce Plugin tellement simple et facile d'utilisation. Grand merci... Many thanks for this Plugin so simple and easy to use. Big thanks
  • Mobile layout: Header takes too much space

    Moved
    5
    0 Votes
    5 Posts
    1k Views
    M
    The issue is fixed by the way.
  • This topic is deleted!

    2
    0 Votes
    2 Posts
    8 Views
  • Cannot Connect Xpresso Nodes in Python

    3
    0 Votes
    3 Posts
    1k Views
    M
    Hi, here in Cinema 4D S22 defining the type of the cloner I don't have anymore an issue import c4d from c4d import gui import math def main(): # Build Parent Cloner cloner = c4d.BaseObject(1018544) cloner[c4d.ID_MG_MOTIONGENERATOR_MODE] = c4d.ID_MG_MOTIONGENERATOR_MODE_LINEAR doc.InsertObject(cloner) # Build Null newnull = c4d.BaseObject(c4d.Onull) newnull.InsertUnder(cloner) # Build Children Cloner internal_cloner = c4d.BaseObject(1018544) internal_cloner[c4d.ID_MG_MOTIONGENERATOR_MODE] = c4d.ID_MG_MOTIONGENERATOR_MODE_GRIDARRAY internal_cloner.InsertUnder(newnull) internal_cloner.Message(c4d.MSG_MENUPREPARE, doc) # Cube cube = c4d.BaseObject(c4d.Ocube) internal_cloner.Message(c4d.MSG_MENUPREPARE, doc) cube.InsertUnder(internal_cloner) # Xpresso Tag xtag = c4d.BaseTag(c4d.Texpresso) cloner.InsertTag(xtag) # Setup Parent Cloner cloner[c4d.MG_LINEAR_OBJECT_POSITION, c4d.VECTOR_Y] = 0.0 cloner[c4d.MG_LINEAR_OBJECT_POSITION, c4d.VECTOR_Z] = 500.0 cloner[c4d.MG_LINEAR_COUNT] = 10 cloner[c4d.MGCLONER_VOLUMEINSTANCES_MODE] = c4d.MGCLONER_VOLUMEINSTANCES_MODE_RENDERINSTANCE # Setup Children Cloner internal_cloner[c4d.MG_GRID_SIZE] = c4d.Vector(300, 200, 100) # Setup Cube cube[c4d.PRIM_CUBE_LEN] = c4d.Vector(20, 10, 100) # Setup Xpresso # http://mograph.net/board/index.php?/topic/26338-creating-xpresso-nodes-with-python-script/ nodemaster = xtag.GetNodeMaster() node1 = nodemaster.CreateNode(nodemaster.GetRoot(), c4d.ID_OPERATOR_OBJECT, None, 100, 100) node1[c4d.GV_OBJECT_OBJECT_ID] = internal_cloner gridResParam = c4d.DescID(c4d.DescLevel(c4d.MG_GRID_RESOLUTION, c4d.DTYPE_VECTOR,0), c4d.DescLevel(c4d.VECTOR_Z, c4d.DTYPE_REAL,0)) node1out = node1.AddPort(c4d.GV_PORT_OUTPUT, gridResParam) node2 = nodemaster.CreateNode(nodemaster.GetRoot(), c4d.ID_OPERATOR_OBJECT, None, 300, 100) node2[c4d.GV_OBJECT_OBJECT_ID] = cloner posParam = c4d.DescID(c4d.DescLevel(c4d.MG_LINEAR_OBJECT_POSITION, c4d.DTYPE_VECTOR,0), c4d.DescLevel(c4d.VECTOR_Z, c4d.DTYPE_REAL,0)) node2in = node2.AddPort(c4d.GV_PORT_INPUT, posParam) # Connect if node1out is not None and node2in is not None: node1out.Connect(node2in) c4d.EventAdd() # refreshed viewport to see changes automatically if __name__=='__main__': main() And as pointed by @PluginStudent the problem was because the AddPort fails. And I guess it failed because at the time you ask for the port creation since no explicit mode was defined in the Cloner the XPresso description was not properly fed so this GvPort didn't exist. Cheers, Maxime.