PDA

View Full Version : scripted custom attributes function access?


3rd Dimentia
04-29-2011, 04:28 AM
I have an attribute holder that I've added some scripted custom attributes to. It contains among other things, buttons that run functions that are also stored in the custom attributes. What I want to be able to do is write a separate macro that will be able to act as though a user has pressed these buttons that are on the attribute holder. I know how to get to the modifiers of each object that hold these attributes/functions but have no idea how to, of even if it's possible to, execute the functions stored within.

Many thanks in advance,

Cg.

MikieK
04-29-2011, 05:17 AM
I have an attribute holder that I've added some scripted custom attributes to. It contains among other things, buttons that run functions that are also stored in the custom attributes. What I want to be able to do is write a separate macro that will be able to act as though a user has pressed these buttons that are on the attribute holder. I know how to get to the modifiers of each object that hold these attributes/functions but have no idea how to, of even if it's possible to, execute the functions stored within.

Many thanks in advance,

Cg.

If I get the gyst of your question...

Where AttributeName is the name of your scripted attribute
and rollout is what you called your rollout within your attribute defenition...

$.modifiers[#Attribute_Holder].AttributeName.rollout.dooStuff()

3rd Dimentia
04-29-2011, 05:36 AM
Cheers for that. With that I can get access to and run the function, but it seems I have a whole bunch of problems with scope as my functions call other functions and parameters that are in the custom attributes that aren't accessible to that function when it's run that way. I also can't make all the relevant stuff global either. Hmm. I've got some thinking to do.

I just noticed that you're in Melbourne, where do you work?

Thanks for the speedy reply.

Cg.

MikieK
04-29-2011, 05:51 AM
when i have my code writing hat on, i'm in vermont... otherwise i travel quite a bit...

where abouts are you? fancy a pint?

3rd Dimentia
04-29-2011, 06:05 AM
I work in Sth Melbourne, live a few km's further south. Pretty much always up for a pint.

MikieK
04-29-2011, 06:11 AM
well maybe an after work drink or two at honey in south melbs then.

seeing unkle tonight, but maybe next week?...

so random to run into someone from melby on the forum :)

CGTalk Moderation
04-29-2011, 06:11 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.