PDA

View Full Version : getNameByName affter gc() got a "system exception"


easyfrog
04-21-2012, 08:29 AM
getNodeByName affter gc() got a "system exception". I have a mesh object. named "kp02tokp03". use "when constraction" to build it dynamicly . it works fine . but affter gc(). use getNodeByName "kp02tokp03" to get the object .then got a "system exception". ......... I really dont know. where is the problem.!

Gravey
04-21-2012, 08:36 AM
i have had problems with getNodeByName in the past so i usually just iterate the objects collection using matchpattern and return the first result.fn getObjByName pattern =
(
(for o in objects where matchpattern o.name pattern:pattern collect o)[1]
)
getObjByName "kp02tokp03"

martinez
04-21-2012, 10:06 AM
Suggestions…

Run gc() at the end of the script.
myNode = execute ("$'" + "kp02tokp03" + "'")
Try gc light:true

CGTalk Moderation
04-21-2012, 10:06 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.