Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Converter/BL_BlenderDataConversion.cpp
| Show First 20 Lines • Show All 1,505 Lines • ▼ Show 20 Lines | static KX_GameObject *gameobject_from_blenderobject( | ||||
| case OB_CAMERA: | case OB_CAMERA: | ||||
| { | { | ||||
| KX_Camera* gamecamera = gamecamera_from_bcamera(ob, kxscene, converter); | KX_Camera* gamecamera = gamecamera_from_bcamera(ob, kxscene, converter); | ||||
| gameobj = gamecamera; | gameobj = gamecamera; | ||||
| //don't add a reference: the camera list in kxscene->m_cameras is not released at the end | //don't add a reference: the camera list in kxscene->m_cameras is not released at the end | ||||
| //gamecamera->AddRef(); | //gamecamera->AddRef(); | ||||
| kxscene->AddCamera(gamecamera); | kxscene->GetCameraList()->Add(gamecamera->AddRef()); | ||||
| break; | break; | ||||
| } | } | ||||
| case OB_MESH: | case OB_MESH: | ||||
| { | { | ||||
| Mesh* mesh = static_cast<Mesh*>(ob->data); | Mesh* mesh = static_cast<Mesh*>(ob->data); | ||||
| float center[3], extents[3]; | float center[3], extents[3]; | ||||
| ▲ Show 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | #endif | ||||
| case OB_FONT: | case OB_FONT: | ||||
| { | { | ||||
| bool do_color_management = BKE_scene_check_color_management_enabled(blenderscene); | bool do_color_management = BKE_scene_check_color_management_enabled(blenderscene); | ||||
| /* font objects have no bounding box */ | /* font objects have no bounding box */ | ||||
| gameobj = new KX_FontObject(kxscene,KX_Scene::m_callbacks, rendertools, ob, do_color_management); | gameobj = new KX_FontObject(kxscene,KX_Scene::m_callbacks, rendertools, ob, do_color_management); | ||||
| /* add to the list only the visible fonts */ | /* add to the list only the visible fonts */ | ||||
| if ((ob->lay & kxscene->GetBlenderScene()->lay) != 0) | if ((ob->lay & kxscene->GetBlenderScene()->lay) != 0) | ||||
| kxscene->AddFont(static_cast<KX_FontObject*>(gameobj)); | kxscene->GetFontList()->Add(gameobj->AddRef()); | ||||
| break; | break; | ||||
| } | } | ||||
| #ifdef THREADED_DAG_WORKAROUND | #ifdef THREADED_DAG_WORKAROUND | ||||
| case OB_CURVE: | case OB_CURVE: | ||||
| { | { | ||||
| if (ob->curve_cache == NULL) { | if (ob->curve_cache == NULL) { | ||||
| BKE_displist_make_curveTypes(blenderscene, ob, false); | BKE_displist_make_curveTypes(blenderscene, ob, false); | ||||
| ▲ Show 20 Lines • Show All 780 Lines • Show Last 20 Lines | |||||