dotnet btns to max menu

srry for "HARD" questions :)

Is it possible?

AttachmentSize
btns2menu.jpg78.47 KB
groups_interface.jpg42.38 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
artrender.info's picture

I have Updated the

I have Updated the information there, I've added max file and script!

barigazy's picture

And discussion back when we start :)

Here is the solution. Enjoy!

  1. try(destroyDialog ::bgaRoll)catch()
  2. rollout bgaRoll "• • •"
  3. (
  4. fn filtGroup o = isGroupMember o or isGroupHead o
  5. fn getRootGroupHead node = if isgroupmember node do
  6. (
  7. while node != undefined and (not isgrouphead node or isgroupmember node) do (node = node.parent)
  8. node
  9. )
  10. pickbutton pick "PickGroup" pos:[5,5] width:100 height:20 filter:filtGroup
  11. on pick picked obj do if obj != undefined and selection.count !=0 do
  12. (
  13. local rootGroup = getRootGroupHead obj
  14. InstanceMgr.GetInstances rootGroup &groups
  15. selObjs = getCurrentSelection()
  16. if groups.count > 1 then
  17. (
  18. with redraw off
  19. (
  20. for i = 1 to groups.count where groups[i] != rootGroup do
  21. (
  22. maxOps.cloneNodes selObjs cloneType:#instance newNodes:&objs
  23. for o in objs do
  24. (
  25. if o.parent != undefined do o.parent = undefined
  26. tm = o.transform * (inverse rootGroup.transform)
  27. o.transform = tm*groups[i].transform
  28. attachNodesToGroup o groups[i]
  29. )
  30. )
  31. attachNodesToGroup selObjs rootGroup
  32. )
  33. )
  34. )
  35.  
  36. )
  37. createDialog bgaRoll 110 30 10 110 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

barigazy

artrender.info's picture
artrender.info's picture

thx, Barigazy!

But I still have a problem with adding objects to all group instances, when groups are transformed! You remember, I've sent it to you before, to your email! I like - group manager - sounds easy and close to what it does!

barigazy's picture

...

Your problem can be solved if you provide an *.max example and code which cause error. Don't forget screenshoot also to see exactly what do you want to achive. Post it here or open new thread if you want and we will continue discussion. Ok?

barigazy

artrender.info's picture

hm

no, I'm talking from another computer here! :)

barigazy's picture

...

When do you plan to post your finished tool here on scriptspot?
Awesome idea for new script will be "GroupManager" (like LayerManager) using .net treelis. Just thinking out loud :)Do you dare to accept the challenge?

;)

barigazy

artrender.info's picture

Barigazy, I've answered at cgsociety!

you can take a look! Thank you!

barigazy's picture

...

You are back from the trip :)

barigazy

artrender.info's picture

thx, Barigazy

it works fine and smooth! And thx for the code! If I find words to express happiness, then I will add them to the dictionary!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.