New feature to copy properties from one object to all selected objects

This commit is contained in:
Dion Moult
2021-10-25 14:21:11 +11:00
parent e70f675f20
commit 2e6a70b338
17 changed files with 213 additions and 42 deletions
@@ -25,6 +25,7 @@ from blenderbim.tool.ifc import Ifc
from blenderbim.tool.material import Material
from blenderbim.tool.misc import Misc
from blenderbim.tool.owner import Owner
from blenderbim.tool.pset import Pset
from blenderbim.tool.qto import Qto
from blenderbim.tool.root import Root
from blenderbim.tool.spatial import Spatial
+31
View File
@@ -0,0 +1,31 @@
# BlenderBIM Add-on - OpenBIM Blender Add-on
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
#
# This file is part of BlenderBIM Add-on.
#
# BlenderBIM Add-on 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 3 of the License, or
# (at your option) any later version.
#
# BlenderBIM Add-on 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
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import bpy
import ifcopenshell
import blenderbim.core.tool
import blenderbim.tool as tool
class Pset(blenderbim.core.tool.Pset):
@classmethod
def get_element_pset(cls, element, pset_name):
psets = ifcopenshell.util.element.get_psets(element)
pset = psets.get(pset_name, None)
if pset:
return tool.Ifc.get().by_id(pset["id"])