Creating Custom Attributes in C#

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

 
Thread Tools Search this Thread Display Modes
  04 April 2014
Creating Custom Attributes in C#

Hi,

I'm relatively new to working with C# in 3ds max and am having some trouble figuring out how to do custom attributes. I can read them in C#, but I need to create them either by defining them in C# and applying them or using C# to apply custom attributes defined in maxscript.

I have been looking at ICustAttrib for a while and cannot figure out how to go about creating custom attributes or how to use it to assign the ones defined in maxscript (if that is even possible). None of the methods I see in ICustAttrib seem to allow me to define a new custom attributes. I have also looked as MSCustattrib. I get the feeling I will need to go down to the paramblock2 level, but am not sure. I am trying something along these lines:

            IICustAttribContainer mytest = root_node.CustAttribContainer;
            mytest.SetCustAttrib(1, my_attrib2);


But am not sure how to define the my_attrib2 variable. It is currently an ICustAttrib object.

I am porting a set of maxscripts over to C# partly to learn the SDK better and partly to give me some other flexibility within those apps.

Anyway, any help or hints would be appreciated.

Thanks

Todd
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:26 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.