Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. Rage
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 17
    • Posts 27
    • Best 0
    • Controversial 0
    • Groups 0

    Rage

    @Rage

    0
    Reputation
    214
    Profile views
    27
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Rage Unfollow Follow

    Latest posts made by Rage

    • RE: How to set project scale

      So, to be clear, in the end I need an user to interact and I can't do it in scripting? Can I access the dialog, somehow?

      posted in General Talk
      R
      Rage
    • RE: How to set project scale

      Thanks @r_gigante for your reply

      What if I want to scale the project using the "Scale Project" button?
      I know that I can use the CallButton() function, but I don't know how to properly set the settings

      c4d.CallButton(op, c4d.DOCUMENT_SCALEDOCUMENT)

      op is a baselist containing the options for the button, right? How can I set the options (current and target scale)? I searched in the c++ documentation but all I could find is the ddoc.h with a reference to it, with no description.

      posted in General Talk
      R
      Rage
    • Buttons ids

      Hi all,

      For the python function CallButton I have to pass the id of the button I want to call. Nice, where do I find the ids for the buttons? I can't see any information/indication on the python documentation

      Best,
      Niccolò

      posted in Cinema 4D SDK python
      R
      Rage
    • Triangulate geometry when exporting a fbx

      Hi All,

      I'd like to triangulate the geometry when exporting a fbx from python. I've been searching the documentation for the id for the "triangulate geometry" option, but it looks like there's nothing about it. Also, the fbx exporter has no id like the others. For example the object export is c4d. FORMAT_OBJ2EXPORT while the fbx export is 1026370

      Here's a piece of my script

      container = c4d.plugins.GetWorldPluginData(1026370)
      for id, value in container:
          if id == c4d.FBXEXPORT_TRIANGULATE_GEOMETRY:  container[id] = 1
      ...
      
      posted in Cinema 4D SDK r20 python
      R
      Rage
    • Set options when importing a file

      Hi All,

      I've been searching the python documentation but I've found no way to set the options when loading a 3d file. The functions LoadFile() and LoadDocument() don't seem to allow you to set settings such as "Flip z axis" or "swap X and Y axes" which are available, as instance, when importing an obj

      Then, how can I set the settings displayed in the gui when importing a file?

      posted in Cinema 4D SDK r20 python
      R
      Rage
    • How to set project scale

      Hi All,

      I'm trying to figure out how to change the Project scale and type (centimeters, meters etc etc) through python.

      I think I've to use the UnitScale class, but the documentation is a bit unclear about this class
      Reference:
      https://developers.maxon.net/docs/py/2023_2/modules/c4d/CustomDataType/UnitScaleData/index.html#c4d.UnitScaleData

      Any help?

      posted in General Talk r20 python
      R
      Rage
    • RE: Tag not in sync

      It seems like it has a projection.

      Please note that I don't know c4d, I'm just coding with the api but I don't know the software itself (I came from the blender's world)

      Anyways, If you go to the UV edit, and you select your object and UVW tag, you can choose the UV mapping - Projection

      let me attach a screenshot of what I'm trying to access. On the bottom right you can see there are some projections types, how do I set those through python?

      0_1549970768494_Screen Shot 2019-02-12 at 12.25.12.png

      posted in Cinema 4D SDK
      R
      Rage
    • Tag not in sync

      Hi All,

      I'm trying to create a new UVWTag (if an object doesn't already have one). Here's my basic code:

      def main():
      obj = doc.GetFirstObject()

      if obj.GetTag(c4d.Tuvw) is None:
          tag = obj.MakeTag(c4d.Tuvw)
          tag[c4d.TEXTURETAG_PROJECTION]=3
          tag.SetName('Cubic_map')
          c4d.EventAdd()
      

      The code runs howewer, cinema reports the following error later when trying to access the uv:

      A problem with this project has been detected: Object "Cube" - Tag 5671 not in sync. Please save and contact MAXON Support with a description of the last used commands, actions or plugins.

      What Am I missing?

      posted in Cinema 4D SDK r20 python
      R
      Rage
    • RE: SetDocumentData options for exporting

      Hi @m_adam ,

      Let me give you more details.
      I'm writing a plugin that processes the geometry of each object in a scene. After processing the geometry I want to export the file as obj and mtl. I followed the documentation to do this last part (linked in the first post) but the mtl is not exporting. On the other hand, on another machine, the mtl gets exported.

      If you go to file->export->obj , after selecting the path to export to, you will see that a list of parameters pops up. In one of these parameters you can set to export or to don't export the materials. For some reasons, when I run the plugin, on my computer the material is not exported. How can I set this property and all the others that pop up in this dialog?

      posted in Cinema 4D SDK
      R
      Rage
    • SetDocumentData options for exporting

      Hi everyone,

      I'm struggling to find the options (like the ones visible in the gui, export materials/flip z axis and so on) in the python documentation.

      SaveDocument takes a base document as parameter and I set its settings using SetDocumentData that points to this list of settings:

      [https://developers.maxon.net/docs/Cinema4DPythonSDK/html/consts/DOCUMENTSETTINGS.html](link url)

      I don't see all the options I can see in the gui. How do I set them?

      posted in Cinema 4D SDK r20 python
      R
      Rage