← All ideas
  • Published 12 May 2023

Adding info on objects if they have been duplicated linked or not

I wanted to write a script that finds all objects that were linked with alt d and add .linked to their names. Turns out this isn't possible as blender doesn't store that kind of information. Please add this information. Objects linked from other blend files get is_library_indirect. Linked locally should also have something to identify them.

100%

Development Status: Open

Upvote 1 Downvote 0
brah.rah
12 May 2023

2 Comments

Chat GPT could probably write a simple script to do this. I've had it write basic quality-of-life scripts for me before then used Serpens 3 to make the UI for my custom tools.

You could say somethings like "write a blender script that adds "_whatever_whatever" to the end of all linked duplicates"

Lauloque

There:

import bpy

def main():
    linked_data_blocks = set()

    for obj in bpy.context.scene.objects:
        if len(obj.users_collection) > 1:
            obj.name += ".linkedLibrary"
        elif obj.data in linked_data_blocks:
            obj.name += ".linked"
        else:
            linked_data_blocks.add(obj.data)

if __name__ == '__main__':
    main()

It should rename linked duplicates with .linked , and linked libraries with .linkedLibray .