On 06/04/2017 at 07:47, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : PYTHON ;
---------
Hey there,
for my plugin I need to know which keyframe and or fcurve has been selected.
I know of checking key via GetNBit, running the following code in a loop returns 0 for every single bit when selecting a curve or key in the f-curve timeline.
If I select keys in dopesheet-mode c4d.NBIT_TLx_SELECT returns the right values
print ("------------------ SEL BITS KEY ---------------")
print str(key.GetNBit(c4d.NBIT_TL1_SELECT))
print str(key.GetNBit(c4d.NBIT_TL2_SELECT))
print str(key.GetNBit(c4d.NBIT_TL3_SELECT))
print str(key.GetNBit(c4d.NBIT_TL4_SELECT))
print ("------------------ SEL BITS CURVE ---------------")
print str(curve.GetNBit(c4d.NBIT_TL1_FCSELECT))
print str(curve.GetNBit(c4d.NBIT_TL2_FCSELECT))
print str(curve.GetNBit(c4d.NBIT_TL3_FCSELECT))
print str(curve.GetNBit(c4d.NBIT_TL4_FCSELECT))
print ("------------------ SEL BITS END -----------------")
I can act on any curve or keys that get I try this part of the code, so there shouldnt be a problem there.
Am I using this feature wrong or is there a bug with the NBits? Is there any other way to find out if a key got selected in the f-curve editor?