Compare commits

..

2 Commits

Author SHA1 Message Date
izzy lyseggen 6b872f11d9 Merge pull request #75 from specklesystems/izzy/add-parent-type
feat(convert): add parent type to display meshes
2021-12-09 10:59:28 +00:00
izzy lyseggen fd3742b800 feat(convert): add parent type to display meshes
makes it easier to work w geo from places like revit
2021-12-09 10:58:22 +00:00
+4 -1
View File
@@ -208,7 +208,7 @@ def from_speckle_object(speckle_object, scale, name=None):
add_custom_properties(speckle_object, blender_object)
add_blender_material(speckle_object, blender_object)
# TODO: chat with tom re transforms
# TODO: transforms
# set_transform(speckle_object, blender_object)
return blender_object
@@ -218,6 +218,9 @@ def from_speckle_object(speckle_object, scale, name=None):
speckle_object, "displayMesh", getattr(speckle_object, "displayValue", None)
)
if mesh:
# add parent type here so we can use it as a blender custom prop
# not making it hidden, so it will get added on send as i think it might be helpful? can reconsider
mesh.parent_speckle_type = speckle_object.speckle_type
return from_speckle_object(mesh, scale, speckle_name)
# return none if fail