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

    How to generate a tag?

    Cinema 4D SDK
    python 2024
    2
    3
    536
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      Frischvergiftung
      last edited by

      Hi everyone,

      this is a very basic question i suppose. I am a long time (R13) C4D user and i decided on a whim to try to make me a tag or script that will allow me to place a car on a slanted plane. As we work with cars all the time i thought, wouldnt that be great to have a tag placing a car for me so that every wheels touches the ground.

      I got ChatGPT to write me a script, but i can't seem to figure out where to save it or how to call it. I tried several ways. I saved the script as a .py in its own folder, also adding a res/description folder structure and placed a description.res in there. I can see the now under Extensions/User Scripts, but when i click it nothing happens...

      I'd like the tag to have a field to put in the floor object and a run button.

      I am following these steps:

      • Load the script file align_car_to_floor.py by clicking File > Load... and navigating to your script.

      • Click the Execute button to run the script. This should register the custom tag.

      • Apply the Custom Tag: Select the object you want to apply the tag to (e.g., a car model).

      • Right-click on the object, navigate to Tags > Python Tags > Align Car to Floor.

      I wonder if this is really correct... C4D wont show me a custom tag in Tags > Python Tags >

      Can someone give me a pointer as to how this really works? I have zipped my results so far and i am upping them here. Maybe someone could take a quick peek what my problem here is?

      For now it would just be cool if that tag really showed up, i haven't even gotten to testing the aligning script at all.

      #########
      Align_to_Floor_Tag.zip
      ########

      Thanks, Max

      i_mazlovI 1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov @Frischvergiftung
        last edited by

        Hello Max,

        Welcome to the Maxon developers forum and its community, it is great to have you with us!

        Getting Started

        Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

        • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
        • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
        • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

        It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions.

        About your First Question

        Unfortunately, according to our Support Procedures your question is out of scope from our support. Specifically, you can find in the Scope of Support section the following:

        We cannot provide support for the side-effects of unexperienced users using AI models to write code.

        We cannot debug your code for you and instead provide answers to specific problems.

        We cannot provide support on learning C++, Python

        I can recommend you the following:

        1. Familiarize yourself with the Getting Started page on our documentation.
        2. Check the TagData plugin hook.
        3. Explore our examples library, especially the Py-LookAtCamera example.

        If you feel like you're lacking Python programming background at any of these steps, feel free to address some educational resources, there're so many of them available for free online. (My personal recommendation would be to focus on educational resources rather than consulting any of the AI assistants, as it's going to be more efficient after all).

        Once you have any further questions, specific to our SDK, you're welcome to create new thread on the forum (according to our guidelines on how to ask questions in the most efficient way).

        Cheers,
        Ilia

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • F
          Frischvergiftung
          last edited by

          Ok thanks. Will do that!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post