From 825b7b98d7f8aefb09dcd95d2abc06efd7ffe562 Mon Sep 17 00:00:00 2001 From: oguzhankoral Date: Wed, 8 Mar 2023 23:35:26 +0300 Subject: [PATCH] Fix rubocop suggestions --- speckle_connector/src/speckle_objects/geometry/mesh.rb | 4 ++-- .../src/speckle_objects/other/block_instance.rb | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/speckle_connector/src/speckle_objects/geometry/mesh.rb b/speckle_connector/src/speckle_objects/geometry/mesh.rb index 6765721..c489cd7 100644 --- a/speckle_connector/src/speckle_objects/geometry/mesh.rb +++ b/speckle_connector/src/speckle_objects/geometry/mesh.rb @@ -70,8 +70,8 @@ module SpeckleConnector indices = faces.shift(num_pts) native_mesh.add_polygon(indices.map { |index| points[index] }) end - state, materials = Other::RenderMaterial.to_native(state, mesh['renderMaterial'], - layer, entities, &convert_to_native) + state, _materials = Other::RenderMaterial.to_native(state, mesh['renderMaterial'], + layer, entities, &convert_to_native) # Find and assign material if exist unless mesh['renderMaterial'].nil? material_name = mesh['renderMaterial']['name'] || mesh['renderMaterial']['id'] diff --git a/speckle_connector/src/speckle_objects/other/block_instance.rb b/speckle_connector/src/speckle_objects/other/block_instance.rb index 1b19e62..f5ac82f 100644 --- a/speckle_connector/src/speckle_objects/other/block_instance.rb +++ b/speckle_connector/src/speckle_objects/other/block_instance.rb @@ -150,9 +150,10 @@ module SpeckleConnector # without instances find_and_erase_existing_instance(definition, block['id'], block['applicationId']) puts("Failed to create instance for speckle block instance #{block['id']}") if instance.nil? + # Transform already applied to instance unless is group instance.transformation = transform if is_group - state, materials = Other::RenderMaterial.to_native(state, block['renderMaterial'], - layer, entities, &convert_to_native) + state, _materials = Other::RenderMaterial.to_native(state, block['renderMaterial'], + layer, entities, &convert_to_native) # Retrieve material from state unless block['renderMaterial'].nil?