本文整理汇总了C++中CGroupObject::UpdateReference方法的典型用法代码示例。如果您正苦于以下问题:C++ CGroupObject::UpdateReference方法的具体用法?C++ CGroupObject::UpdateReference怎么用?C++ CGroupObject::UpdateReference使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroupObject
的用法示例。
在下文中一共展示了CGroupObject::UpdateReference方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReloadRefsSelectedObject
void ESceneGroupTools::ReloadRefsSelectedObject()
{
ObjectList lst = m_Objects;
int sel_cnt = 0;
if (!lst.empty()){
bool bModif = false;
for (ObjectIt it=lst.begin(); it!=lst.end(); it++){
if ((*it)->Selected()){
sel_cnt++;
CGroupObject* obj = dynamic_cast<CGroupObject*>(*it); VERIFY(obj);
if (obj->UpdateReference()){
bModif = true;
}else{
ELog.Msg (mtError,"Can't reload group: '%s'.",obj->Name);
}
}
}
if (bModif) Scene->UndoSave();
}
if (0==sel_cnt) ELog.Msg (mtError,"Nothing selected.");
}
示例2: ReloadRefsSelectedObject
void ESceneGroupTool::ReloadRefsSelectedObject()
{
ObjectList lst = m_Objects;
int sel_cnt = 0;
if (!lst.empty())
{
string_path temp_file_name_sector,temp_file_name_portal;
GetTempFileName ( FS.get_path(_temp_)->m_Path, "tmp_sector", 0, temp_file_name_sector );
Scene->SaveToolLTX (OBJCLASS_SECTOR, temp_file_name_sector);
GetTempFileName ( FS.get_path(_temp_)->m_Path, "tmp_portal", 0, temp_file_name_portal );
Scene->SaveToolLTX (OBJCLASS_PORTAL, temp_file_name_portal);
bool bModif = false;
for (ObjectIt it=lst.begin(); it!=lst.end(); ++it)
{
if ((*it)->Selected())
{
sel_cnt++;
CGroupObject* obj = dynamic_cast<CGroupObject*>(*it);
VERIFY (obj);
if (obj->UpdateReference(true))
{
bModif = true;
}else
{
ELog.Msg (mtError,"Can't reload group: '%s'.",obj->Name);
}
}
}
if(bModif)
Scene->UndoSave ();
Scene->LoadToolLTX (OBJCLASS_SECTOR, temp_file_name_sector);
Scene->LoadToolLTX (OBJCLASS_PORTAL, temp_file_name_portal);
}
if (0==sel_cnt)
ELog.Msg (mtError,"Nothing selected.");
}