[Closed] custom attribute position
Hi everybody,
I search to put a custom attribute at the first position in the column, (eg : before “selection” for an edit poly object).
I dont find anything in google and the help.
Can you help me ?
Thank you !
If i understand you correctly you need this
obj = teapot()
addmodifier obj (Bend())
addmodifier obj (Twist())
addmodifier obj (TurboSmooth())
addmodifier obj (Flex())
--------------------------
firstMod = (EmptyModifier name:"AboveBaseObj")
addModifier obj firstMod before:(obj.modifiers.count)
thank you for your help,
It s something like that but my custom attr is not a modifier, it s a simply rollout attr:
custAttributes.add $ myRollAttr
With that my new rollout is put at the end of the parameters column (not modifiers column).
i try that but nothing:
custAttributes.add $ myRollAttr before:(0)
i still don't understand your question well but there is probably what you are looking for:
[left]custAttributes.add <node> <attr_def> baseObject:on
[/left]
He want to put CA rollout at the begining to be first roll in command panel, above rollout “Parameters”.
Is that even possible? I thought custom rollouts could only be appended.
Hi,
Actually, if I understand the issue correctly, it is possible with MXS. You need to use the rollout’s category parameter:
(
local def = attributes myCustAttrib
(
Parameters main rollout:params
(
Param1 Type:#float UI:Param1 Default:0.0
)
Rollout Params "My Rollout At the Top!!!" Category:1 -- Note the Category:1, this is what makes the rollout appear at the top
(
spinner Param1 "Param1:" Width:160 Height:16 Align:#Center Offset:[0,0] Type:#float Range:[0,100,0]
)
)
local o = sphere()
CustAttributes.Add o def baseObject:true
select o
)
Cheers,
o
i didn’t know that. thanks!
Edit:
I’ve checked do I really never used the rollout ‘category’ mechanism. And of course I did use it but only in RolloutFloaters. And I’ve never used it in scripted plug-in (because it has another order system), and never in CA which is most useful for me. Thanks again!