Skip to content

feat: allow specific object updates in LocalView#65

Open
jspanchu wants to merge 1 commit into
masterfrom
passthrough-ids-to-update
Open

feat: allow specific object updates in LocalView#65
jspanchu wants to merge 1 commit into
masterfrom
passthrough-ids-to-update

Conversation

@jspanchu

Copy link
Copy Markdown
Member

No description provided.

self.api.update(
push_camera=push_camera,
obj_to_update=[self._render_window, *self.__registered_obj],
obj_to_update=obj_to_update,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok if it is not a list?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if the following would be better?

if obj_to_update is None:
    obj_to_update = [self._render_window, *self.__registered_obj]

if not isinstance(obj_to_update, list|tuple):
    obj_to_update = [obj_to_update]

self.api.update(
    push_camera=push_camera,
    obj_to_update=obj_to_update,
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also be if not isinstance(obj_to_update, list|tuple): => if isinstance(obj_to_update, str): if those ids are str?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants