CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 08-09-2005, 11:16 AM   #1
Martin Andersen
Martin Andersen's Avatar
Join Date: Jan 2003
Posts: 242
Send a message via AIM to Martin Andersen Send a message via Yahoo to Martin Andersen
how do I create a Custom Attribute slider?


I'm using PEN attribute holder 2 and I would like to add a custom attribute slider (with script)

How can I do that?
Martin Andersen
Old 08-09-2005, 11:27 AM   #2
random data generator
rdg's Avatar
Georg Duemlein
New Zealand
Join Date: Feb 2004
Posts: 779
Send a message via AIM to rdg
Hi one way is this:

create a string containing your customAttribute definition and add it to the object:

-- dummy values theKm=10 realKM=10 -- attrib def start theCustAttr = "theAttribute = attributes CAT_Test (\n" theCustAttr += "parameters main rollout:roTest\n" theCustAttr += " (\n" theCustAttr += " theKm type:#integer ui:theKm default:"+realKm as String+"\n" -- skiped details theCustAttr += " )\n" theCustAttr += " rollout roTest \"Parameters\" \n" theCustAttr += " (\n" theCustAttr += " spinner theKm \"km:\" range:[0, 100000.0, "+realKm as String+"] type:#integer \n" theCustAttr += " )\n" theCustAttr += ")\n" -- attrib def end -- add it to the selected object custAttributes.add $.modifiers[1] (execute(theCustAttr))

This examle adds a spinner, but adjusting it would be easy.
If there is a way without "execute", please post it.

Georg Duemlein

Last edited by duemlein : 08-09-2005 at 11:29 AM. Reason: code formatting
Old 08-09-2005, 11:27 AM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,479
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Society of Digital Artists

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

All times are GMT. The time now is 07:41 AM.

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