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

    stanDM

    @stanDM

    0
    Reputation
    45
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    stanDM Unfollow Follow

    Latest posts made by stanDM

    • RE: Takes - material override in Python

      Hi Ferdinand,

      thanks a lot!

      posted in Cinema 4D SDK
      S
      stanDM
    • Takes - material override in Python

      Hi,

      I am dynamically generating takes in Python and I need to override material (replace one material with another one) on specific object. I have found a script which allows you to override material color, but I have no clue how to override the whole material.. any ideas?

      for i in xrange(10):
              
              takeName = "Variation " + str(i)
              materialVariation = takeData.AddTake(takeName, None, None)
              
              if materialVariation is not None:
                  
                  materialColorParameter = c4d.DescID(c4d.DescLevel(c4d.MATERIAL_COLOR_COLOR, c4d.DTYPE_COLOR, 0))
                  
                  hsv = c4d.Vector(float(i) * 0.1, 1.0, 1.0)
                  rgb = c4d.utils.HSVToRGB(hsv)
                  
                  overrideNode = materialVariation.FindOrAddOverrideParam(takeData, material,materialColorParameter, rgb)
                  
                  if overrideNode is not None:
                      overrideNode.UpdateSceneNode(takeData, materialColorParameter )
      
      posted in Cinema 4D SDK python
      S
      stanDM
    • RE: Get object by active tag in Python

      Cool, thanks!

      posted in Cinema 4D SDK
      S
      stanDM
    • Get object by active tag in Python

      Hi,

      I am able to retrieve a list of all selected tags in scene via doc.GetActiveTags(), but now I need to get a list of objects linked to those active tags and because objects are not selected themselves, doc.GetActiveObject() gives you Null. Is it somehow possible in Python? I guess the must be some BaseLink relation between selected tag and its object, just could not find any real world example.

      Thanks for any help!

      posted in Cinema 4D SDK python
      S
      stanDM
    • RE: Radio button groups in two columns

      Hi Maxime,

      it now works great, thank you very much for your support!

      Cheers,
      Stan

      posted in Cinema 4D SDK
      S
      stanDM
    • RE: Radio button groups in two columns

      Hi Maxime,

      thanks a lot for help! I have deleted Group.End for RadioGroup, but I still cannot achieve the desired layout - for one static text field it worked, but not for RadioGroups or RadioGroups nested in Groups. I have tried to change different params but could not make it work.

      Enclosed is the image of what I try to achieve. Any idea how to do it is appreciated!

      pythonDialog.jpg

      Thanks, Stan

      P.S. next time I will make sure my topic is tagged properly 🙂

      posted in Cinema 4D SDK
      S
      stanDM
    • Radio button groups in two columns

      Hi, I have tried to design dialog box layout with two columns, each with RadioGroup inside. So I created nested level 2 groups - and it worked with static text, but when I added RadioGroups to level 2 groups, it never worked. Any idea what is wrong here?

      self.GroupBegin(GROUP_ID0, c4d.BFH_SCALEFIT, 2,0)
      self.GroupBorderSpace(10,10,10,10)
      
      self.GroupBegin(GROUP_ID1, c4d.BFH_SCALEFIT, 1,0)
      #self.AddStaticText(id=1001,flags=c4d.BFH_LEFT,initw=100, name="Left column")
      self.AddRadioGroup(RADIO_GROUP1, c4d.BFH_LEFT, 1, 0)
      self.AddChild(RADIO_GROUP1, RADIO1_A, 'Option A1')
      self.AddChild(RADIO_GROUP1, RADIO1_B, 'Option B1')
      self.SetBool(RADIO1_A, True)  # Set first radio button on.
      self.GroupEnd()
      self.GroupEnd()
      
      
      self.GroupBegin(GROUP_ID2, c4d.BFH_SCALEFIT, 1, 0)
      #self.AddStaticText(id=1002,flags=c4d.BFH_LEFT,initw=100, name="Right column")
      self.AddRadioGroup(RADIO_GROUP2, c4d.BFH_LEFT, 1, 0)
      self.AddChild(RADIO_GROUP2, RADIO2_A, 'Option A1')
      self.AddChild(RADIO_GROUP2, RADIO2_B, 'Option B2')
      self.SetBool(RADIO2_A, True)  # Set first radio button on.
      self.GroupEnd()
      self.GroupEnd()
      
      self.GroupEnd()
      

      Thanks,

      Stan

      posted in Cinema 4D SDK
      S
      stanDM