Hi Ferdinand,
thanks a lot!
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 )
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!
Hi Maxime,
it now works great, thank you very much for your support!
Cheers,
Stan
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!
Thanks, Stan
P.S. next time I will make sure my topic is tagged properly
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