Navigation

    • Register
    • Login
    • Search
    • Categories
    1. Home
    2. iluxa7k
    I
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    iluxa7k

    @iluxa7k

    2
    Reputation
    10
    Posts
    147
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Location Russia

    iluxa7k Follow

    Posts made by iluxa7k

    • RE: [python] SetFont not working

      @m_adam said in [python] SetFont not working:

      In which version are you? The code I posted is working nicely in R20.059.

      20.059. Before i tried any methods, that's my fail. Not work for me. From new start of c4d. - it works

      posted in Cinema 4D Development
      I
      iluxa7k
    • RE: [python] SetFont not working

      Hello Maxime
      Thank you.
      I tried such form and can not get it work. I think i'm "messing"(replace FontData to BaseContainer) data for GUI, so it does not work for me.

      posted in Cinema 4D Development
      I
      iluxa7k
    • RE: [python] SetFont not working

      Found such solution:

      import c4d
      
      def main():
      
          bc = c4d.BaseContainer()
          ids = c4d.PRIM_TEXT_FONT
          #ids = c4d.DescID(c4d.DescLevel(2117,1009372,5178))
          op.SetParameter(ids, bc, c4d.DESCFLAGS_SET_0)
          bc.SetString(500, 'Arial')
          bc.SetString(501, '11')
          bc.SetInt32(502, 400)
          bc.SetInt32(503, 0)
          bc.SetString(509, 'Arial')
          bc.SetString(508, 'ArialMT')
          new_fd = c4d.FontData()
          new_fd.SetFont(bc)
          op.SetParameter(ids, new_fd, c4d.DESCFLAGS_SET_0)    
          c4d.SendCoreMessage(c4d.COREMSG_CINEMA, c4d.BaseContainer(c4d.COREMSG_CINEMA_FORCE_AM_UPDATE))
          c4d.gui.GeUpdateUI()
          c4d.EventAdd()
      
      # Execute main()
      if __name__=='__main__':
          main()
      
      posted in Cinema 4D Development
      I
      iluxa7k
    • [python] SetFont not working

      Hello
      C4D version: 20.059
      OS: Windows 10

      I select motext and try to change font(fontdata) for text by script

      import c4d
      from c4d import plugins
      def main() :
        bc = c4d.BaseContainer()
        bc.SetString(500, 'Arial')
        bc.SetString(501, '11')
        bc.SetInt32(502, 400)
        bc.SetInt32(503, 0)
        bc.SetString(509, 'Arial')
        bc.SetString(508, 'ArialMT')
        # select mograph text
        op[c4d.PRIM_TEXT_FONT].SetFont(bc)
        op.Message(c4d.MSG_CHANGE)
        c4d.EventAdd()
      if __name__=='__main__':
        main()
      

      can not get it work ☹

      posted in Cinema 4D Development
      I
      iluxa7k
    • RE: Node-Based Materials

      After acquisition of Redshift, i hope we get node material system v.2 and sdk for it.

      Aaron, i think it will be closed work in progress. I read about it from blog at maxon

      posted in Cinema 4D Development
      I
      iluxa7k
    • RE: Good Bye and Thanks for the Fish

      Andreas thank you! You need new pool for fish 🐳

      Welcome, Manuel! xplode 😎 them all !!! 😉

      posted in Forum Information & Resources
      I
      iluxa7k
    • RE: GV Node AddPort fail

      Hello
      Same here for python. Even check by AddPortIsOK(), says True, not adding

      I also test c++ code, it adds to object operator(like topic master wants) but does not to nodemaster and no connect

      {
          BaseDocument *doc = GetActiveDocument();
      
          BaseObject *obj = (BaseObject *) doc->GetActiveObject();
          if(!obj) return FALSE;
      
          XPressoTag *xTag = (XPressoTag*)obj->GetTag(Texpresso, 0);
          if(!xTag) return FALSE;
      
          GvNodeMaster *nm = xTag->GetNodeMaster(); 
      
          GvNode *n1 = nm->GetRoot();
          GvPort *p1;
          if (n1->AddPortIsOK(GV_PORT_OUTPUT,40000002))
          {
      	    p1 = n1->AddPort(GV_PORT_OUTPUT, 40000002, GV_PORT_FLAG_IS_VISIBLE, TRUE);
      	    print("True"); 
          }
          else
          {
      	    print("False"); 
          }
            
          GvPort *p3 = n1->AddPort(GV_PORT_OUTPUT, 536870935, GV_PORT_FLAG_IS_VISIBLE, TRUE);
          
          GvNode *n2 = nm->CreateNode(nm->GetRoot(), ID_OPERATOR_OBJECT, NULL, 0, 0);
          GvPort *p2 = n2->AddPort(GV_PORT_OUTPUT, 40000002, GV_PORT_FLAG_IS_VISIBLE, TRUE);
      
          if (p1 && p2)
          {
              GvNode *n1u = NULL;
              GvNode *n2u = NULL;
              GvPort *p1u = NULL;
              GvPort *p2u = NULL;
              if (nm->IsConnectionValid(n1, p1, n2, p2, n1u, p1u, n2u, p2u))
              {
                n2->AddConnection(n1, p1, n2, p2);
              }
           }
          n1->Message(MSG_UPDATE);
          n2->Message(MSG_UPDATE);
          nm->Message(MSG_UPDATE);
      
          EventAdd();
      }
      
      posted in Cinema 4D Development
      I
      iluxa7k
    • RE: Welcome!

      @a_block and sdk team
      Cool forum...!!!✌

      posted in Forum Information & Resources
      I
      iluxa7k
    • Wonderful Project tool

      Hello
      I read manual, repeat with sdk (zip file), compile succesfully and start thinking about author of tool. I'm fan of Niklas Rosenstein and his craftr. New tool reminds me craftr.

      Thanks a'lot for tool!

      posted in Cinema 4D Development
      I
      iluxa7k