[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:

Sorry for the late answer, could you provide a copy of your file or tell me exactly from which type of object you were copying to which one ? If you’re using bones you’re better of with the previous version I think, I didn’t really test it through with armatures

I’ll try to reproduce it when I have time later. As far as I remember it had no armature but parenting.

I’m sorry but i dont know how to paste the properties in, it just copies it for me

I’m getting the following error in blender 3.0 after install and trying to run on any two objects.

It’s because they changed the way ui properties are handled in the API. This should work :

Also @mbbmbbmm this should fix your issue if you’re using 3.0+

object_copy_custom_properties_1_08.py (6.6 KB)

2 Likes

Thanks for the script. Was just about asking for some in 3.0… :smiley:

I gonna give this a try :slight_smile:

and am glad some people fill the abnormally missing mandatory cracks in blender !

Happy blending !

EDIT: this script works like a charm ! :smiley:

1 Like

I was having an issue with blender [...] IDProperty does not support UI data so I updated it to fix the issue (referenced what the rigify addon does)

object_copy_custom_properties_1_09.py (6.8 KB)

1 Like