Python API: Fix many incorrect Python API docstrings #116245

Open
nutti wants to merge 1 commits from nutti/blender:fix-incorrect-python-api-documents into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

This PR fixes many incorrect Python API docstrings and make the consistent descriptions.

This PR fixes many incorrect Python API docstrings and make the consistent descriptions.
nutti added 1 commit 2023-12-16 06:05:43 +01:00
nutti requested review from Pratik Borhade 2023-12-16 06:06:58 +01:00
nutti requested review from Campbell Barton 2023-12-16 06:07:14 +01:00
Pratik Borhade reviewed 2023-12-17 08:06:50 +01:00
Pratik Borhade left a comment
Member

Hi, thanks for the PR

Hi, thanks for the PR
@ -880,3 +880,3 @@
:type type: string
:arg verts: Coordinates.
:type verts: sequence of of 2D or 3D coordinates.
:type verts: sequence of sequence of floats.
Member

old description is more understandable I guess

old description is more understandable I guess

Agree, this is removing useful information.

Agree, this is removing useful information.
Campbell Barton requested changes 2023-12-20 00:38:14 +01:00
@ -1133,3 +1133,3 @@
(most_complete_path, "struct.prop", "struct.prop:'enum'").
If no enum_name is given, the third element will always be void.
:rtype: tuple of strings
:rtype: tuple of strs

This doesn't seem like an improvement.

This doesn't seem like an improvement.
@ -408,3 +408,3 @@
"\n"
" :arg color: float sequence each representing ``(r, g, b, a)``.\n"
" :type color: sequence of 3 or 4 floats\n"
" :type color: sequence of floats\n"

Removes useful information.

Removes useful information.
@ -342,3 +342,3 @@
"\n"
" :arg scale: Scale the current stack matrix.\n"
" :type scale: sequence of 2 or 3 floats\n");
" :type scale: sequence of floats\n");

Removes useful information.

Removes useful information.
@ -383,3 +383,3 @@
"\n"
" :arg offset: Translate the current stack matrix.\n"
" :type offset: sequence of 2 or 3 floats\n");
" :type offset: sequence of floats\n");

Removes useful information.

Removes useful information.
@ -3095,3 +3095,3 @@
PyDoc_STRVAR(Matrix_row_doc,
"Access the matrix by rows (default), (read-only).\n\n:type: Matrix Access");
"Access the matrix by rows (default), (read-only).\n\n:type: :class:`Matrix`");

This is incorrect, this doesn't return a matrix.

This is incorrect, this doesn't return a matrix.
@ -3103,3 +3103,3 @@
PyDoc_STRVAR(
Matrix_col_doc,
"Access the matrix by columns, 3x3 and 4x4 only, (read-only).\n\n:type: Matrix Access");
"Access the matrix by columns, 3x3 and 4x4 only, (read-only).\n\n:type: :class:`Matrix`");

This is incorrect, this doesn't return a matrix.

This is incorrect, this doesn't return a matrix.
@ -338,3 +338,3 @@
"\n"
" :arg vectors: Vectors to calculate normals with\n"
" :type vectors: sequence of 3 or more 3d vector\n"
" :type vectors: sequence of floats or `mathutils.Vector`\n"

Removes useful information.

Removes useful information.
@ -951,3 +951,3 @@
" :type exponent: float\n"
" :return: A list of distances to the four closest features and their locations.\n"
" :rtype: list of four floats, list of four :class:`mathutils.Vector` types\n");
" :rtype: list of float, list of :class:`mathutils.Vector`\n");

Removes useful information.

Removes useful information.
This pull request has changes conflicting with the target branch.
  • source/blender/freestyle/intern/python/BPy_Operators.cpp
  • source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
  • source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
  • source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
  • source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
  • source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
  • source/blender/python/bmesh/bmesh_py_utils.cc
  • source/blender/python/generic/blf_py_api.cc
  • source/blender/python/gpu/gpu_py_capabilities.cc
  • source/blender/python/gpu/gpu_py_framebuffer.cc

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix-incorrect-python-api-documents:nutti-fix-incorrect-python-api-documents
git checkout nutti-fix-incorrect-python-api-documents
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
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#116245
No description provided.