Notifications
Clear all
[Closed] saving data-adding CA to the root or to the global tracks
Jul 24, 2007 12:41 pm
i been moving of using the persitent gloabl and i read the sample of the help
“[color=white][font=Verdana]Using scripted CAs for persistent data storage”[/color][/font][color=white][b][font=Verdana] [size=2]and check how blur di save the dat on his onion script.
the guys of blur are not saving the dat to the root node the are saving it to the global tracks.
SMData = attributes "SMData"
(
-- version
parameters main rollout:blank
(
LayerName type:#StringTab tabSizeVariable:true animatable:false --array of strings.
GroupName type:#StringTab tabSizeVariable:true animatable:false --Array of strings.
)
rollout blank "blank"
(
)
)
custAttributes.add globaltracks SMData
globaltracks.SMData .LayerName =#("cinco", "saas")
globaltracks.SMData .GroupName = #("aaaas", "aaaa")
i found easier to understand the code for adding CA to the global tracks, is any benefit of adding the CA to the root that will make it better.
[/b][/font][/color][/size]
1 Reply
Jul 24, 2007 12:41 pm
this is the code for adding to the root of the max scene. copied for the help.
sceneDataCADef = attributes sceneDataCADef version:1 attribID:#(0x61e9ff5f, 0x63784819)
(
parameters main rollout:params
( note type:#string ui:et_note default:"" )
rollout params "Scene Data Parameters"
( edittext et_note "Note: " )
)
thescene = (refs.dependents rootnode)[1]
rootNodeDataCA = undefined
if (custattributes.add rootnode sceneDataCADef) do
rootNodeDataCA = rootnode.custAttributes[rootnode.custAttributes.count]
sceneDataCA = undefined
if (custattributes.add thescene sceneDataCADef) do
sceneDataCA = thescene.custAttributes[thescene.custAttributes.count]
rootNodeDataCA.note
sceneDataCA.note
rootNodeDataCA.note = "rootnode"
sceneDataCA.note = "thescene"
i found it much more complex.