#103978 Add deprecation warnings to GPUBatch program usage. #117299
No reviewers
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117299
Loading…
Reference in New Issue
No description provided.
Delete Branch "Prakhar-Singh-Chouhan/blender:#103978"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Continuing my previous #105295. This pull request adds the reviews mentioned.
@ -178,6 +178,11 @@ PyDoc_STRVAR(
" :type program: :class:`gpu.types.GPUShader`\n");
static PyObject *pygpu_batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_shader)
{
/*raising Deprecation Warning when calling `gpu.types.GPUBatch.program_set` */
Make sure you run
make format
in your source folder to ensure the formatting rules have been applied@ -179,2 +179,4 @@
static PyObject *pygpu_batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_shader)
{
/*raising Deprecation Warning when calling `gpu.types.GPUBatch.program_set` */
PyErr_WarnEx(PyExc_DeprecationWarning,
Perhaps also guard this with a
static bool deprecation_warning_issued
other wise the console will be flooded with messages and it influence performance.@ -180,1 +180,4 @@
{
/*raising Deprecation Warning when calling `gpu.types.GPUBatch.program_set` */
PyErr_WarnEx(PyExc_DeprecationWarning,
"'program_Set' is deprecated."
Typo it is
program_set
@ -181,0 +181,4 @@
/*raising Deprecation Warning when calling `gpu.types.GPUBatch.program_set` */
PyErr_WarnEx(PyExc_DeprecationWarning,
"'program_Set' is deprecated."
"Please set the shader directly when calling GPUBatch.draw", 1);
Mention the program parameter, so developers don't need to lookup the parameter when this message is shown
@Jeroen-Bakker What should the program parameter be ???
@ -226,0 +237,4 @@
"Calling GPUBatch.draw without specifying a program is deprecated. "
"Please provide a valid GPUShader as the 'program' parameter.",
1);
}
I expected
deprecation_warning_issued = true;
statement herePlease don't close pull request, just update them, otherwise the code review will get really complicated and doesn't leave a trail of evidence. You can just push to your branch and the pull request will automatically update.
i had some problems with keeping my branch upto date so I closed this and made a new pull request with the changes #117324
Sorry, but it is best to update this branch. You can do a force push to this branch if you had problems updating your branch
@Jeroen-Bakker did the changes in this PR itself. Can you have a look at it ? Should I close this one#117324 ?
Still one comment has not been solved. If you have questions about it, you can reply on the comment
@blender-bot build
@Jeroen-Bakker what should the program parameter be that I should display??
9c5e86ef84
to15a14661a8
15a14661a8
to008cea20f0
@Jeroen-Bakker I forced pushed the changes from my branch, but other changes have also been added in it which I don't understand. Can you have a look at those ?
Only blender organization members with write access can start builds. See documentation for details.
You did a merge, but didn't resolve the merge issues. You have to resolve them. Currently your branch doesn't compile
as they conflicts have not been resolved..
4cda8c8410
to52fa197a73
@Jeroen-Bakker I have merged the changes, can you have a look at them.
This patch still has some merge conflicts markings and therefore doesn't compile.
@Jeroen-Bakker removed the merge conflict markings.
Please make sure you run
make format
before committing. There are some parts of the code that doesn't follow our code style conventions.See https://developer.blender.org/docs/handbook/guidelines/c_cpp/ and specifically the section about comments.
@Jeroen-Bakker done.
@Jeroen-Bakker is the issue resolved or do I have to make any changes to the PR ?
@ -184,0 +184,4 @@
static bool deprecation_warning_issued = false;
/* deprecation warning raised when calling `gpu.types.GPUBatch.program_set`. */
Sentences should start with a capital. Also check the comment you wrote later in the PR.
If you want to place the PR in my inbox again, there is a button you can press next to my name. I had to spent more time looking for the PR, than actually reviewing :-)
@Jeroen-Bakker Done
@blender-bot build
@Jeroen-Bakker should i do some changes to this ?
Thanks for the heads up. The build failed due to other out of date head. Committed to main via
4ce13fe198
Thanks for your work on this task!
WIP #103978 Add deprecation warnings to GPUBatch program usage.to #103978 Add deprecation warnings to GPUBatch program usage.Pull request closed