Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to write a function to return Custom Attribute values, in this case the range of the sliders in the Attribute's Rollout.
The way it's written now the function returns the correct range if only one object is selected: [0,100,0]
But if multiple objects are selected it starts returning ranges of [0,0,0]
Can anyone tell me why this is happening and where I went wrong?
Here's the script and I'm attaching a sample scene.
fn print_Att_Info =
(
for i in selection where i.modifiers.count > 0 do
(
for j in i.modifiers do
(
if classOf j == emptyModifier do
(
def = custAttributes.getDefs j
for d in def do
(
rolloutName = (custAttributes.getPBlockDefs d)[1][4][2]
rolloutDef = (getProperty j.CustAttributes[d.name] rolloutName)
for c in rolloutDef.controls do
(
if isProperty c "range" do
(
format "obj:%\n ctrl:%\n range:%\n " i.name c.caption c.range
)
)
)
)
)
)
)
Thanks for any help!
Solved! Go to Solution.