Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2991)

Issue 4639043: BGE resize callback

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by Moguri
Modified:
12 years, 11 months ago
CC:
bf-codereview_blender.org
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

This patch allows callbacks (both C/C++ side and Python side) to be registered for resize events. When the size of the canvas changes, the callbacks will be called. As a demonstration of where this can be used on the C++ side, I've updated the 2D Filters to use a callback. From the Python side it's handy for updating gui libraries such as bgui: https://code.google.com/p/bgui/ I wasn't sure who to add as "Reviewers". Dalai and Benoit originally discussed resize callbacks some time ago.

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -0 lines) Patch
source/gameengine/Ketsji/KX_KetsjiEngine.h View 3 chunks +49 lines, -0 lines 0 comments Download
source/gameengine/Ketsji/KX_KetsjiEngine.cpp View 6 chunks +73 lines, -0 lines 4 comments Download
source/gameengine/Ketsji/KX_PythonInit.cpp View 2 chunks +22 lines, -0 lines 0 comments Download
source/gameengine/Ketsji/KX_Scene.h View 1 chunk +1 line, -0 lines 0 comments Download
source/gameengine/Ketsji/KX_Scene.cpp View 1 chunk +6 lines, -0 lines 1 comment Download

Messages

Total messages: 4
Moguri
12 years, 11 months ago (2011-06-17 09:31:39 UTC) #1
dfelinto
Hi Mitchell, I never implemented callbacks, but it seems like you did the right way ...
12 years, 11 months ago (2011-06-17 17:24:40 UTC) #2
Moguri
On 2011/06/17 17:24:40, dfelinto wrote: > Hi Mitchell, > > I never implemented callbacks, but ...
12 years, 11 months ago (2011-06-17 19:25:20 UTC) #3
Moguri
12 years, 11 months ago (2011-06-17 19:25:42 UTC) #4
https://codereview.appspot.com/4639043/diff/1/source/gameengine/Ketsji/KX_Ket...
File source/gameengine/Ketsji/KX_KetsjiEngine.cpp (right):

https://codereview.appspot.com/4639043/diff/1/source/gameengine/Ketsji/KX_Ket...
source/gameengine/Ketsji/KX_KetsjiEngine.cpp:239: 
On 2011/06/17 17:24:41, dfelinto wrote:
> don't you also need to clear m_pyfunc?

decrefing m_pyfunc is handled in ResizseCallback's destructor.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b