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. x_nerve
    3. Best
    X
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 35
    • Best 3
    • Controversial 0
    • Groups 0

    Best posts made by x_nerve

    • RE: How to add Strengths of each Pose I set in Pose Morph as Ports into Xpresso?

      Hi:

      @PATPAT
      First of all, the point movement algorithm of attitude deformation label is not complicated.

      I've seen in some tutorials that you can add some data to a port with unconventional operations, but I forgot . So, I use Python nodes.

      The data control label object weight value for the input port, so you need to add a user data of type link to the Python node.

      Python is a dynamic language, and data types cannot be determined before compilation. There is no conditional right or wrong judgment in my code, so please add them by yourself.

      import c4d
      
      def main():
      
          obj = op[c4d.ID_USERDATA,1]
      
          Tags = obj.GetTags()
          
          Pose = [tag for tag in Tags if tag.GetRealType() == 1024237]
      
          #[4000,1101] is the ID of the strength value.  
       
          Pose[0][4000,1101] = Input1
      
          global Output1
          Output1 = Pose[0][4000,1101]
      

      17.jpg

      posted in Cinema 4D SDK
      X
      x_nerve
    • RE: Some attempts at nondestructive modeling

      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.
      
      
      
      
      posted in General Talk
      X
      x_nerve
    • [Fork] Detailed C++ Plugin Development Process Tutorial

      @kbar Thank you very much for your great work, because C++ development documentation has long lacked user education, and .XDL64 files cannot be generated smoothly even for novices who have the source files.You are really great to replace the SDK-team to complete the user education.

      Before you posted the video, many people posted C++ development videos for C4D, but after version R19, the API interface parameters changed, and these videos lost their user education significance.Thank you for your contribution to making more people learn how to generate .XDL64 files. This is the first and most important first step.

      @ferdinand Generating the .XDL64 file is the most important first step, but in the C++ development documentation, the Project Tool chapter is very professional and prevents novices from properly generating the .XDL64 file.

      Suggest additional development steps, such as 1,2,3,.....
      Such as:

          1:  Download the Project Tool.
      
          2:  Create a new .TXT file and write it to  ......\cinema4d_r23_project_tool_314356_win-macos\kernel_app_64bit.exe g_updateproject=......
      
          3:  .TXT file format changed to.bat.
      
          4:  ...
      
          5:  ...
      
         ......
      

      edit: This topic has been forked from C++ Plugin Development Tutorials [Ferdinand]

      posted in General Talk c++
      X
      x_nerve