[Addon] Copy Custom Properties

I’ve updated your add-on so that it also copies the subtype of the origin property (useful when working with colors), and also the is_overridable_property flag, useful when working with library overrides. Let me know if you are against it, I’ll take it down.

I didn’t test the compatibility with bones / Armatures since I don’t use it for that purpose though.
Also I’m not sure when the is_overridable_property flag was introduced, it may need a bit of tweaking to check the blender version.

object_copy_custom_properties_1_07.py (6.5 KB)

Hi, i think this is fine :slight_smile:
Thanks for taking a look into this.

1 Like

Thanks to all of you for this cool addon!
But with the 1.07 version I get an error (1.06 seems to work fine):

Error: Python: Traceback (most recent call last):
  File "C:\Users\mbbmbbmm\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\object_copy_custom_properties_1_07.py", line 95, in execute
    [[set_prop(ob, name, value, rna, overridable) for (name, value, rna, overridable) in getProps(active)] for ob in selected]
  File "C:\Users\mbbmbbmm\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\object_copy_custom_properties_1_07.py", line 95, in <listcomp>
    [[set_prop(ob, name, value, rna, overridable) for (name, value, rna, overridable) in getProps(active)] for ob in selected]
  File "C:\Users\mbbmbbmm\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\object_copy_custom_properties_1_07.py", line 78, in getProps
    values = [(name, ob[name], getRNA(ob, name),  ob.is_property_overridable_library(f'["{name}"]')) for name in names]
  File "C:\Users\mbbmbbmm\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\object_copy_custom_properties_1_07.py", line 78, in <listcomp>
    values = [(name, ob[name], getRNA(ob, name),  ob.is_property_overridable_library(f'["{name}"]')) for name in names]
  File "C:\Users\mbbmbbmm\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\object_copy_custom_properties_1_07.py", line 71, in getRNA
    return ob['_RNA_UI'][name].to_dict()
KeyError: 'key not in subgroup dict

I had a look inside the script to see if I could fix it, but I’m not skilled enough with Python and the Blender api… so confusing :sweat_smile: