[Addon] Copy Custom Properties

thank you guys

Thank you for this script it came in handy! This should be included with Blender.

Any chance we could get an update to this that works with pose bones?

here is an update which should work with bones, edit_bones and… pose bones.

object_copy_custom_properties_1_03.zip (1.76 KB)

The copy button is still located at the object property panel only, but it affects object data and now armature bones too.
I only quickly tested with 2 bones of different armatures, hope that was the expected kind of usage ?
(copying custom props of all bones of active armature to selected armature and the respective bones)
Best is of course if both armatures have the same amount of bones, the copy algorithm is rather dumb… atleast there should
be no errors if thats not the case, but results may be unexpected…

Hello,

this version supports copying custom props of an active posebone / editbone / bone to selected posebones / editbones /bones inside the same armature additionally. Under bone context you find an according panel with a new operator button on it.

object_copy_custom_properties_1_04.zip (1.94 KB)

super useful! it still work on 2.76 but even that I got this error:

bpy.ops.group.objects_remove(group=’<UNKNOWN ENUM>’)
Traceback (most recent call last):
File “C:\Users\Max\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\object_copy_custom_properties.py”, line 107, in execute
[[set_prop_bones(ob.data.bones, data) for (data) in getPropBones(active.data.bones)] for ob in selected]
File “C:\Users\Max\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\object_copy_custom_properties.py”, line 107, in <listcomp>
[[set_prop_bones(ob.data.bones, data) for (data) in getPropBones(active.data.bones)] for ob in selected]
AttributeError: ‘Mesh’ object has no attribute ‘bones’

location: <unknown location>:-1

Hi,

i think this update should fix that error. It just missed checks whether the objects are actually armatures or not.

object_copy_custom_properties_1_05.zip (1.98 KB)

Handy and usefull tool. Thanks

Thank you so much !

Small update for blender 2.8, just changed the required blender version from (2,7,7) to (2,80,0) only, and bumped the addon version number from (1,0,5) to (1,0,6). Should work as before.

object_copy_custom_properties_1_06.zip (2.0 KB)

3 Likes

Thank you for this, looks super useful

Very useful indeed! Could you also add a button to copy properties from other places, like scene custom properties to object custom properties, please?!?

Thank you! It was useful for my project.

Thank you and marry me please, i am creating a character with about 15 items that should be able to move freely, parent to the body and both of the hands, i was about to lose it when i realized the amount of custom properties to drive constrains i would have to create over and over. Thanks again!

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