I replaced std::list used for cameras and fonts by CListValue, so i removed AddFCamera, FindCamera, AddFont, FindFont functions.
I took advantage of CListValue and add a python attribute for fonts :
KX_Scene.fonts
Differential D1150
BGE : Cleanup camera and font list Authored by Porteries Tristan (panzergame) on Feb 28 2015, 11:21 PM.
Details I replaced std::list used for cameras and fonts by CListValue, so i removed AddFCamera, FindCamera, AddFont, FindFont functions. KX_Scene.fonts
Diff Detail
Event TimelineComment Actions It's just a cleanup for devs, all other listes in scene use CListValue i think cameras and fonts don't need to use a std::list there are no advantages. Comment Actions Looks good to me. Some things became more complex (scene->FindCamera(name) became (KX_Camera*)scene->GetCameraList()->FindValue(name)) but I feel that the improvement in consistency is worth it. Comment Actions Only I miss the doc for new fonts attribute (bge_types/bge.types.KX_Scene.rst). Other than this, looks good to me. Comment Actions I'm not yet sure if I like these changes, so I'm blocking this revision until I can find time to look over it in detail. Comment Actions Python can edit CListValue's, but your patch doesn't mention this... which is concerning.
Comment Actions Python can edit CListValue's, but your patch doesn't mention this... which is concerning. There is no case of a CListValue owned by python at the moment. (other than scene.cameras, but it disallowed now) | ||||||