Skip to content

createCamera method should not change the current camera #5941

Closed as duplicate of#7077
@quarks

Description

@quarks

Topic

The method createCamera does the following -

  1. creates a new camera
  2. changes the current camera to the new one
  3. returns the new camera

I am suggesting that changing the current camera is bad practice because

  • the method title does not suggest that this is going to happen
  • the method documentation does not say that this is going to happen
  • there is a method called setCamera that performs this action

and most importantly

  • if the user creates a camera for later use (e.g. using multiple cameras) then they must restore the current camera to its previous state.

Technically this isn't a bug rather a nuisance.

Personally I would like to see this changed so the method simply creates and returns a new camera. The user can easily use the new camera immediately or save it for later.

I am interested in hearing what others think.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions