Notifications
Clear all

[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 !

11 Replies
1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

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.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

with MXS it’s not possible. using sdk you can set any order of rollouts.

@col-one,

(You probably know this, but in case you didn’t.) If it’s not necessary to see the Editable Poly rollouts you can add an Attribute Holder modifier and apply the CA to that. The Attribute Holder is an empty modifier than you can append any properties too.

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

2 Replies
(@gazybara)
Joined: 11 months ago

Posts: 0

Yep. That’s the one.

(@denist)
Joined: 11 months ago

Posts: 0

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!

Yes !

Thank you so much every body