Notifications
Clear all

[Closed] Custom Attribute UI item limit in modifier panel?

 S-S

Like the topic says.

I have done a script, which adds selected objects xyz position and rotation “tracks” as parameters into another objects modifier (like attribute holder). After this i instance the tracks of objects into these parameters. Parameters have slider UI.

Today i have tested my script a bit more. I can add 80-90 object’s sliders (6 per object) into modifier panel. Its a long list, but it works. But when i add more than 90 sliders – max crashes and complains something about parameter block definition. (i’ll try to catch the error)

I’m just wondering, if someone is familiar with something similar?

  1. Am i adding “too many” sliders UI items to modifier panel? 90 objects is 540 parameters and their UI (currently sliders)
  2. Or is there a limit to amount of attributes in one parameter block?
  3. Or might it be the way i’m adding the attributes to modifier. I first create an empty string, into which i generate the code, which i then execute:


for a = 1 to selection.count – 1 do
(
theName = ($selection[a].name as string)
– Create the parameters for pos
theCode += (“
” + “xp_” + theName + ” type:#float animatable:true default:0.0 ui:” + “xp_” + theName + “S”)
theCode += (“
” + “yp
” + theName + ” type:#float animatable:true default:0.0 ui:” + “yp_” + theName + “S”)
theCode += (“
” + “zp
” + theName + ” type:#float animatable:true default:0.0 ui:” + “zp_” + theName + “_S”)

this approach works ok, and parameter block looks ok, problems only start after about 90 objects…

  1. Is there some sort of limit to length of strings?
  2. I’m thinking about abandoning adding the UI since i might not need it. I haven’t yet tested, if adding parameters works ok without UI.
  • Well. I hope my explanation is clear enough. Thanks in advance!
3 Replies
 PEN

Well not that I have ever reached but I don’t think that I have ever got any were near amount.

The last character facial rig that I set up used 174 tracks of animation but without any UI items, just parameter blocks with three tracks in each. Actualy is a seperate def for each as well.

Can you get the exact error that is comming up. Maybe it is just a max memory issues. Have you increased your heap size? This is something that I do on all machines right away.

 S-S

Hi paul! This is the exact error message:

ParamBlockDesc2 definition error

Error in ParamBlockDesc2 definition.

Invalid param ID block “myChannels”, parameter “”, option #1

…Haven’t had time to search what this error means though. I tried adding parameters without UI, seems like it doesn’t make any difference. Maybe i have to split my parameters into different blocks then.

What i’m trying to do, is i’m going to store all my characters controls into parameters…

 S-S

Paul, your tip really solved the problem!
I put every object’s parameters into own rollout / parameter definition – I tried the script with 150 objects – it worked.
I have position and rotation tracks also instanced into sliders. Of course it’s quite many rollouts, but seems like it works now! I guess i’m going to get rid of the UI part, but it’s a side issue.

The idea of this script is to be able to automaticly add character’s or other rig’s all controls into attribute holder and then automaticly instance each track to corresponding slider. I learned this concept from your rigging dvd!

Thanks a lot Paul!