Gravey
10-21-2008, 05:06 AM
i'm trying to assign custom attributes to xref scenes which I can do BUT each def is not unique... I tried searched the forum and found this thread (http://forums.cgsociety.org/showthread.php?f=98&t=669801&highlight=custom+attribute) but it doesn't seem to work for xrefs.
Here's my example code: (
for i = 1 to (xrefs.getXRefFileCount()) do
(
caExe = "attributes controls\n"
caExe += "(\n"
caExe += " parameters xrefParams\n"
caExe += " (\n"
caExe += " param1 type:#float\n"
caExe += " param2 type:#float\n"
caExe += " )\n"
caExe +=")\n"
ca = execute caExe
x = xrefs.getXRefFile i
custAttributes.add x ca
custAttributes.makeUnique x ca
)
-- i have 2 xrefs in my test scene
for i = 1 to (xrefs.getXRefFileCount()) do (xrefs.getXRefFile i).param1 = random 1 100
for i = 1 to (xrefs.getXRefFileCount()) do print (xrefs.getXRefFile i).finger_bend
) I'm using 2009 design x64 with service pack 1
Here's my example code: (
for i = 1 to (xrefs.getXRefFileCount()) do
(
caExe = "attributes controls\n"
caExe += "(\n"
caExe += " parameters xrefParams\n"
caExe += " (\n"
caExe += " param1 type:#float\n"
caExe += " param2 type:#float\n"
caExe += " )\n"
caExe +=")\n"
ca = execute caExe
x = xrefs.getXRefFile i
custAttributes.add x ca
custAttributes.makeUnique x ca
)
-- i have 2 xrefs in my test scene
for i = 1 to (xrefs.getXRefFileCount()) do (xrefs.getXRefFile i).param1 = random 1 100
for i = 1 to (xrefs.getXRefFileCount()) do print (xrefs.getXRefFile i).finger_bend
) I'm using 2009 design x64 with service pack 1
