# add custom properties of UI to keying set by python

I hope to make keying-set about custom properties of armature. Those were generated by other add ons, and shown in 3dview tool panel.

https://bitbucket.org/Diffeomorphic/import-daz

The panel have columns eg "groupA", "groupB", "groupC" then each gorup show many ID properties with key "morphA", "morphB" ... to change shape.(and some prop set driver to bones)

and those panel are genearated by "init.py" >> class UnitsPanel,, class VisemPanel,,

I could change values of each category ID properties by python, then next I hope to find way to set them as keyingset about each group.

I know from blender UI, when I hover and right-click one property, I could add current property to keying set. then I checked python code, form info

From bpy document, I understand , first I need to active each ID prop on UIlayout. but how can I set these Props as active?

================== @batFinger

thanks I had not looked at the "builtin keying set" template. It was difficult for me to understand how the template work. but I could pick up useful infomation from the script.

At first I tried to make new keying-set with category name(units), and add new path of object["DzUBrowInnerUp-DownL"] in units category.

cs = bpy.context.scene
co = bpy.context.object

cs.keying_sets.new("units","units")
mks = cs.keying_sets["units"]



"DzUBrowInnerUp-DownL" is ID property path which generate by this add on, and it is located "units" section of the panel.

Then, next I hope to find the way to get all "data_path" of this gorup property. and may try loop.

My current question is, "Is there good way to get all "deta-path" of each panel (row) from blender UI only ,without "reading" add-on code? I could read py files of the add on, which generate those ID properties for current armature,it generate new ID-props from import files ,then it seems complex for me to catch all data-path of same category(panel>low),,

though at current I ask vendor of this smart add-on,to adding button,, but I hope to know, if I can get them at once from blender UI with simple python code. then I can add new button, which can make key-set for each group. anyway thanks advice. I really apreciate.

• Have a look at text editor > templates > python > builtin keying sets – batFINGER Nov 18 '17 at 10:26
• Please add a link to the source of the addon that defines the properties / UI mentioned in question. – batFINGER Nov 19 '17 at 8:23
• A link to the source file (in this case) would be handy. Where the properties in question are defined. – batFINGER Nov 19 '17 at 8:39
• thanks, but I do not know it is good way to up-load direct link of soruce file,, – tokikake Nov 19 '17 at 8:42
• OK,, sorry to take your time. – tokikake Nov 19 '17 at 8:57