查看单个帖子
旧 2009-05-06, 07:09 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】odavematerialdetachfromobject90 problem

odavematerial::detachfromobject() problem
odavematerial::detachfromobject() problem
hi,
there is a problem when i try to detach a material from an object and an exception is raised. perhaps the problem is that the entity is not opened for write in the static method odavematerial::detachfromobject(). i opened the object for write before to call this method and there was no exception, but in fact the material was not detached. ideas about how to detach a material will be appreciated.
thanks in advance!
nino
hi,
this is a bug in dd. we will get it fixed in the next maintenance release.
as workaround you can use the next code:
code:
oddbobjectptr pobj = objid.safeopenobject();
odresbufptr paverb = pobj->xdata("ave_finish");
if (!paverb.isnull())
{
paverb = odresbuf::newrb(1001);
paverb->setstring("ave_finish");
pobj->upgradeopen();
pobj->setxdata(paverb);
}
regards,
sergey vishnevetsky
last edited by sergey vishnevetsky; 20th may 2005 at 07:46 amfff">.
thanks for the advice.
regards
nino
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)