Jump to content

How to get a multiparm block's name?


Recommended Posts

Hi, all

Is there anyway to get a parameter name which is in a multiparm blcok folder?

The Image shows the result that I want.

For example, when the user put "+" button ,and a new parameter will be created, its value is the parameter's name.

post-6524-133416164422_thumb.jpg

And My question may be similar with this. But I didn't get help from it.

Any suggestion will be grateful ,thanks!

Link to comment
Share on other sites

I'm doing this for /out to generate render command script. For some reason I can't use Hqueue. So I want split the render task by this way.

When I need to render a 100 frames, and the numbers of parameter is 2, the first parameter will show "...1-50", and second will show "...51-100". When the number is 5, there will be 5 parameters and show "...1-20", "...21-40", "...41-60", "...61-80", "...81-100"

Well, I hope my poor english make my point clear. :lol:

Link to comment
Share on other sites

I'm doing this for /out to generate render command script. For some reason I can't use Hqueue. So I want split the render task by this way.

When I need to render a 100 frames, and the numbers of parameter is 2, the first parameter will show "...1-50", and second will show "...51-100". When the number is 5, there will be 5 parameters and show "...1-20", "...21-40", "...41-60", "...61-80", "...81-100"

Well, I hope my poor english make my point clear. :lol:

Using python (where 'node' is the null1 object):

# To get the parameter count
parmCount = node.parm('folder_name').eval()

# And then loop through them to access each parameter
for i in xrange(1, parmCount+1):
   cmdParm = node.parm('cmd%d' % i)
   print cmdParm.name(), cmdParm.eval() # , etc..

.

Is this what you meant?

Jesse

Link to comment
Share on other sites

Using python (where 'node' is the null1 object):

# To get the parameter count
parmCount = node.parm('folder_name').eval()

# And then loop through them to access each parameter
for i in xrange(1, parmCount+1):
   cmdParm = node.parm('cmd%d' % i)
   print cmdParm.name(), cmdParm.eval() # , etc..

.

Is this what you meant?

Jesse

Thanks for replying.

While what I need is each parameter has exactly the same expreesions or scripts, and can return different value, because their parameter's name is different. Your method needs to write different expressions in each parameter.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...