Maxon Developers
    • Downloads
      • All Downloads
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
      • Cinema 4D Python Examples
      • Cinema 4D C++ Examples
      • Project Tool
      • SDK Database
    • Documentation
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
    • Forum
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Forums
      • Overview
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • News & Information
      • Downloads
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login
    1. Home
    2. Cinema 4D SDK
    Log in to post
    Load new posts
    • Newest to Oldest
    • Oldest to Newest
    • Most Posts
    • Most Votes
    • Most Views
    • lasselauchL

      Change Color of Hyperlink Customgui

      • • lasselauch
      3
      0
      Votes
      3
      Posts
      141
      Views

      lasselauchL

      Okay!
      Thanks for the info @m_adam !

      Oh, and on macOS it is General - Text - Flag Edit Saved
      Bildschirmfoto 2020-04-06 um 14.28.13.png

      ¯_(ツ)_/¯

      Cheers,
      Lasse

    • pyxelriggerP

      how can i get the id of each target? note: I will add more with c4d.CallButton ()

      python r21 classic api • • pyxelrigger
      3
      0
      Votes
      3
      Posts
      169
      Views

      M

      While the method provided by Zipit Is fine, it is not 100% reliable.

      here how to achieve, unfortunately, the ELEMENT_Count value is hardcoded and no way for you to retrieve it.

      constraintTag = doc.GetActiveTag() targetCount = constraintTag[c4d.ID_CA_CONSTRAINT_TAG_PARENT_TARGET_COUNT] for i in range(targetCount): CONSTRAINT_ELEMENT = 10 # This is hardcoded targetId = c4d.ID_CA_CONSTRAINT_TAG_PARENT_TARGET_COUNT + i * CONSTRAINT_ELEMENT + 1 print(constraintTag[targetId])

      Cheers,
      Maxime.

    • N

      VoxelizationInterface

      r20 sdk c++ • • NesNes
      10
      0
      Votes
      10
      Posts
      328
      Views

      N

      Thank you Manuel !! this is exactly what I was looking for 😊

    • M

      Python Generator - Adding Shaders to Deformer Objects

      python • • moGRR
      11
      0
      Votes
      11
      Posts
      364
      Views

      M

      @mp5gosu

      Ah brilliant. Thanks for that!

      And apologies for being such a noob at this.

    • P

      First time compiling of plugin with R21

      r21 c++ sdk • • pim
      5
      0
      Votes
      5
      Posts
      214
      Views

      P

      Yes, I must read the manuals more throroughly (RTFMS).
      Excuses: it is so much and I just wanted to compiler R20 in R21.
      But you are correct.

      BUT, adding iferr to the code worked, AND also solved the other issue.
      Everything is working now!

      Thanks!

    • J

      ParallelFor with race conditions

      c++ windows r21 r20 maxon api • • juergenb
      4
      0
      Votes
      4
      Posts
      176
      Views

      ManuelM

      hi,

      that really depends on what you are doing.
      There's different type of lock for different cases and scenario.

      That also depends on what you care first, speed or memory.

      but the manual is pretty easy to understand, just pass the lock as a reference to your lambda function and you should be good to go.

      Cheers,
      Manuel

    • lasselauchL

      How about updating ResEdit..?

      • • lasselauch
      2
      0
      Votes
      2
      Posts
      220
      Views

      M

      Hi @lasselauch there is actually no plan to update ResEdit.

      There is the R20 Resource Editor but for the moment it's only for Node stuff.

      Cheers,
      Maxime.

    • H

      Modifying timeline marker's attributes

      • • heilei
      5
      0
      Votes
      5
      Posts
      280
      Views

      H

      Thanks for the drag'n'drop tip Maxime, that feature is extremely useful!

    • P

      Is example ExecutePythonScript() also avialable in R19

      r19 c++ python sdk • • pim
      4
      0
      Votes
      4
      Posts
      136
      Views

      M

      Hi Pim sorry for the late reply, this is possible by using the lib_py.h (typically this is somehow what we used before R20 to expose feature in python, but it's way elder, not everything is possible to do, you have less control than with the new python.framework, and the lib_py.h is not maintained (so don't expect any enhancement in it) Only the python.framework will be enhanced.

      // Init Python GePython pythonScope; pythonScope.Init(); // Acquiere the GIL GePythonGIL gil_state; pythonScope.SetNode("doc", doc); // If doc->GetFirstObject() is nullptr, op variable will not be declared in the python scope, and you cant add a None. pythonScope.SetNode("op", doc->GetFirstObject()); maxon::String pythonCode = "\ import c4d\n\ \n\ def main():\n\ print(doc, op)\n\ \n\ if __name__ == '__main__' :\n\ main()\n\ "_s; StopAllThreads(); pythonScope.Run(pythonCode);

      Cheers,
      Maxime.

    • N

      Using Python Node to Traverse Deep Hierarchy... fail

      python • • noseman
      5
      0
      Votes
      5
      Posts
      250
      Views

      N

      Ah, you probably expect the toroids to also rotate around their own axis

      exactly. Thanks

    • B

      Get Decimal/Floating Values On Current Frames Divided by FPS?

      r21 python • • bentraje
      7
      0
      Votes
      7
      Posts
      174
      Views

      ManuelM

      @mp5gosu thanks for the addition.

      Cheers,
      Manuel

    • G

      Can't work out BaseDocument.StartPickSession

      python r21 • • Graeme
      7
      0
      Votes
      7
      Posts
      287
      Views

      M

      Without a further reply from you until tomorrow I will consider and mark this topic as solved, but feel free to open it again if you have more information.

      Cheers,
      Maxime.

    • N

      XPRESSO Python Node "Could not find port value for..." Error

      python • • noseman
      3
      0
      Votes
      3
      Posts
      180
      Views

      N

      @m_magalhaes
      Oh man... thank you so much. Even when I read your reply, I couldn't "see" it in the Node... was staring at it for to long.
      thanks.

    • M

      Python Generator - Accessing Contour Spline

      python • • moGRR
      3
      0
      Votes
      3
      Posts
      168
      Views

      M

      Thanks again @PluginStudent for helping me so quickly.

      That was enough information to help me find the .MakeUserSpline function that allows me to do exactly what I'm after:

      MakeUserSpline('sin(x * PI)', 5)

      More info here for anyone looking.

      Cheers,
      Jamie

    • N

      This topic is deleted!

      • • noseman
      1
      0
      Votes
      1
      Posts
      1
      Views

      No one has replied

    • M

      Python Generator - How to assign a field object to a deformer

      python • • moGRR
      6
      0
      Votes
      6
      Posts
      269
      Views

      M

      Oops - I forgot to have the following line:

      myDefObj[c4d.FIELDS] = myFieldList

      It all works perfectly now. Thanks again for your help @PluginStudent

    • P

      Passing a variable to the python script

      r20 c++ python • • pim
      5
      0
      Votes
      5
      Posts
      219
      Views

      ferdinandF

      Hi,

      yeah like that. __name__ is just another module bound constant attribute. It is a dunder attribute, signaling a special importance, indicated by its double underscores, but that is only a convention and not a functionality. You can set __name__ to anything you like, just like you could set __author__ to your favourite ice cream brand. The convention dictates that __name__ tells the script in which context is being executed, where __main__ should signal that the module is executed directly. You could set it to my_cpp for example, so that your scripts could react differently to being executed from your C++ code.

      Cheers,
      zipit

    • P

      Reading script file into memory

      r20 c++ • • pim
      11
      0
      Votes
      11
      Posts
      530
      Views

      P

      To summarise, there are 2 projectdefinition.txt files.

      on main / sdk level, Define which project (plugins, etc.)
      Example: Platform=Win64;OSX Type=Solution // defines the level of rigour of the source processor's style check stylecheck.level=0 Solution=\ plugins/cinema4dsdk;\ plugins/maxonsdk.module;\ plugins/commandline;\ plugins/CommandLineRendering on plugin level, // Configuration of a custom solution in the projectdefinition.txt file
      Example: // Supported platforms Platform=Win64;OSX // Type of project Type=DLL // this plugin depends on these frameworks: APIS=\ cinema.framework; \ misc.framework; \ image.framework; \ core.framework; \ python.framework // Enable some advanced classic API support; not needed for hybrid plugins C4D=true // Plug-in code-style check level stylecheck.level=0 // Custom ID ModuleId=net.maxonexample.commandlinerender
    • P

      attribute 'nodiscard' requires compiler flag '/std:c++17'

      r20 sdk c++ • • pim
      16
      0
      Votes
      16
      Posts
      836
      Views

      P

      @r_gigante said in attribute 'nodiscard' requires compiler flag '/std:c++17':

      Well @pim , that's indeed the issue. Sticking to the recommended IDE is always recommended.

      Indeed going back to VC++2015 solved the issues.
      But now I have problems with the python.framework.
      See https://developers.maxon.net/forum/topic/12439/reading-script-file-into-memory/8

    • S

      Baking MoGraph color animation to keyframes.

      python r20 • • swever
      6
      0
      Votes
      6
      Posts
      1.3k
      Views

      ManuelM

      hi,

      I will mark that thread as resolved tomorrow if you don't have anything to add 🙂

      Cheers,
      Manuel