Documentation inconsistency for RegionView3D.view_matrix #77926

Closed
opened 2020-06-16 19:21:16 +02:00 by Christopher Gearhart · 9 comments

Blender Version
Broken: 2.83

Short description of error

The documentation claims that the RegionView3D.view_matrix expects a sequence of 16 float values, but when a sequence of 16 float values are passed, an error is thrown.

Exact steps for others to reproduce the error

  1. Open the default startup file
  2. Run the following code in the Python console:
view_area = next(a for a in C.screen.areas if a.type == "VIEW_3D")
rv3d = view_area.spaces[0].region_3d
rv3d.view_matrix = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
  1. You'll see a TypeError is thrown. To get around this, you would need to pass a 2D sequence of floats, contrary to the documentation:
rv3d.view_matrix = (
  (0.0, 0.0, 0.0, 0.0),
  (0.0, 0.0, 0.0, 0.0),
  (0.0, 0.0, 0.0, 0.0),
  (0.0, 0.0, 0.0, 0.0)
)
**Blender Version** Broken: 2.83 **Short description of error** The documentation claims that the [RegionView3D.view_matrix ](https://docs.blender.org/api/blender_python_api_current/bpy.types.RegionView3D.html#bpy.types.RegionView3D.view_matrix) expects a sequence of 16 float values, but when a sequence of 16 float values are passed, an error is thrown. **Exact steps for others to reproduce the error** 1. Open the default startup file 2. Run the following code in the Python console: ``` view_area = next(a for a in C.screen.areas if a.type == "VIEW_3D") rv3d = view_area.spaces[0].region_3d rv3d.view_matrix = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ``` 3. You'll see a TypeError is thrown. To get around this, you would need to pass a 2D sequence of floats, contrary to the documentation: ``` rv3d.view_matrix = ( (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0) ) ```

Added subscriber: @bblanimation

Added subscriber: @bblanimation
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
Aaron Carlisle self-assigned this 2020-06-16 19:45:58 +02:00
Member
You are looking at old documentation see https://docs.blender.org/api/current/bpy.types.RegionView3D.html#bpy.types.RegionView3D.view_matrix

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Resolved' to: 'Archived'

Changed status from 'Resolved' to: 'Archived'

You have linked the API docs of Blender 2.78, it is properly documented in the current API docs for 2.83 .

You have linked the API docs of Blender 2.78, it is properly documented in the [current API docs for 2.83 ](https://docs.blender.org/api/current/bpy.types.RegionView3D.html#bpy.types.RegionView3D.view_matrix).

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'

Ah, you're right! Pesky Google search results showing random Blender doc versions...

Ah, you're right! Pesky Google search results showing random Blender doc versions...
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#77926
No description provided.