Hello,
for the instancing of the objects you might want to check here:
Hi
I have a small script in production that I need to optimise for cycles. There will be a lot of copies in the scene, so I want to make them instances.
I have not found a way to:
a) select only one object, make it active and then use: bpy.ops.object.duplicate_move_linked() (the less elegant approach, I think)
is there a select “none” or deselect all, instead of select_all(‘TOGGLE’)
b) create a mesh and exchange its linked datablock.
Summary: I want to create an empty mesh and replace it’s…
It avoids copying the mesh data block so that memory footprint should be small. Changing of the location of the object still will be possible as shown in the example.
For working with bpy.props.CollectionProperty you might want to check the code that can be found here:
blender-two-dimensional-uilist.py
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
This file has been truncated. show original
Maybe you find useful hints there.
1 Like