Navigation

    • Register
    • Login
    • Search
    • Categories
    1. Home
    2. x_nerve
    3. Topics
    X
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by x_nerve

    • X

      SOLVED The slider tool returns False.
      General Programming & Plugin Discussions • python r21 • • x_nerve  

      2
      0
      Votes
      2
      Posts
      58
      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.
    • X

      SOLVED Some attempts at nondestructive modeling
      General Programming & Plugin Discussions • python r21 • • x_nerve  

      5
      0
      Votes
      5
      Posts
      134
      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: xiuziye@qq.com 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.
    • X

      SOLVED "Axis Center " Script button reuse problem
      General Programming & Plugin Discussions • python r21 • • x_nerve  

      3
      0
      Votes
      3
      Posts
      73
      Views

      X

      Thank you very much for your help to solve the previous doubts. I will continue to work hard.
    • X

      SOLVED The layer material ID is the same as the node material ID.
      General Programming & Plugin Discussions • python r21 • • x_nerve  

      7
      0
      Votes
      7
      Posts
      97
      Views

      M

      Hi in C++ there is the BaseList2D.IsNodeBased method to check if a BaseList2D contains nodes and more interesting there is the NodeMaterial class that represents a Nodal Material, unfortunately, both are not available in Python. Note also that any type of material can be evaluated to a NodeMaterial and this will add the MaterialData the ability to use NodeGraph. So I confirm the only reliable way in Python to know if a material is a NodeBased one is to check the description. If you want to explicitly create a NodeBaseMaterial the only way for you do to do so is via CallCommand with c4d.CallCommand(202541) # New Node Material Cheers, Maxime.