From 165eb238b5d68b64653f6a46c7e1e7147d0f6bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuzhan=20Koral?= <45078678+oguzhankoral@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:24:48 +0300 Subject: [PATCH] Face instances to Bilal (#355) --- speckle_connector_3/src/convertors/to_native_v2.rb | 1 + .../src/speckle_objects/instance_definition_proxy.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/speckle_connector_3/src/convertors/to_native_v2.rb b/speckle_connector_3/src/convertors/to_native_v2.rb index 9a762f8a..a4f62ffe 100644 --- a/speckle_connector_3/src/convertors/to_native_v2.rb +++ b/speckle_connector_3/src/convertors/to_native_v2.rb @@ -149,6 +149,7 @@ def create_definition_proxies definition_name = proxy['name'] definition = state.sketchup_state.sketchup_model.definitions.add(definition_name) + definition.behavior.always_face_camera = proxy['alwaysFaceCamera'] if proxy['alwaysFaceCamera'] @definition_proxies[proxy['applicationId']] = SpeckleObjects::InstanceDefinitionProxy.new( definition, proxy['objects'], diff --git a/speckle_connector_3/src/speckle_objects/instance_definition_proxy.rb b/speckle_connector_3/src/speckle_objects/instance_definition_proxy.rb index e369b5d5..5f245a56 100644 --- a/speckle_connector_3/src/speckle_objects/instance_definition_proxy.rb +++ b/speckle_connector_3/src/speckle_objects/instance_definition_proxy.rb @@ -31,6 +31,7 @@ def initialize(definition, object_ids, max_depth, application_id: nil) @object_ids = object_ids self[:objects] = object_ids self[:maxDepth] = max_depth + self[:alwaysFaceCamera] = definition.behavior.always_face_camera? end def add_object_id(object_id)