srry for "HARD" questions :)
Is it possible?
Forum topic · General Scripting
By artrender.info · 2013-06-03
srry for "HARD" questions :)
Is it possible?
artrender.info · 2013-06-13
I have Updated the information there, I've added max file and script!
And discussion back when we start :)
barigazy · 2013-06-14
Here is the solution. Enjoy!
try(destroyDialog ::bgaRoll)catch()
rollout bgaRoll "• • •"
(
fn filtGroup o = isGroupMember o or isGroupHead o
fn getRootGroupHead node = if isgroupmember node do
(
while node != undefined and (not isgrouphead node or isgroupmember node) do (node = node.parent)
node
)
pickbutton pick "PickGroup" pos:[5,5] width:100 height:20 filter:filtGroup
on pick picked obj do if obj != undefined and selection.count !=0 do
(
local rootGroup = getRootGroupHead obj
InstanceMgr.GetInstances rootGroup &groups
selObjs = getCurrentSelection()
if groups.count > 1 then
(
with redraw off
(
for i = 1 to groups.count where groups[i] != rootGroup do
(
maxOps.cloneNodes selObjs cloneType:#instance newNodes:&objs
for o in objs do
(
if o.parent != undefined do o.parent = undefined
tm = o.transform * (inverse rootGroup.transform)
o.transform = tm*groups[i].transform
attachNodesToGroup o groups[i]
)
)
attachNodesToGroup selObjs rootGroup
)
)
)
)
createDialog bgaRoll 110 30 10 110 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)
jnls · 2018-11-10
help to create rollout button...
barigazy you who are expert in scripts help me, how to create the rollout buttons, which contain other scripts or icons inside, and can save space in my icon bar,
like in the image
I hope you understand me I speak Spanish
here is a short preview
artrender.info · 2013-06-13
thx, Barigazy!
artrender.info · 2013-06-11
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 · 2013-06-11
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?
hm
artrender.info · 2013-06-11
no, I'm talking from another computer here! :)
barigazy · 2013-06-11
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, I've answered at cgsociety!
artrender.info · 2013-06-10
you can take a look! Thank you!
barigazy · 2013-06-10
You are back from the trip :)
thx, Barigazy
artrender.info · 2013-06-07
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!
barigazy · 2013-06-07
The discussion will continue here
http://forums.cgsociety.org/showthread.php?p=7599670#post7599670
barigazy · 2013-06-07
barigazy!
artrender.info · 2013-06-07
I think it's better to post your solution with a printscreen in Cgtalk! I'm sure there will be people that want to hear your ideas!
:)
barigazy · 2013-06-07
Of course it would be. But this forum need some attention too. Members on CGTalk (like me) already knows everything about .net basics.
people
artrender.info · 2013-06-07
display here your interest, pleaaaase!
Oh, barigazy!
artrender.info · 2013-06-07
You're a great person! By the way, I've just seen some errors in my icons when dark bg, I need to correct them (shame for me :)
ok
artrender.info · 2013-06-07
then I'm the first (or second?!!! :)))! haha! Interesting! Very good idea to scale the window!
barigazy · 2013-06-07
Yup. You are second. One more. Is not only about scaling you will see there is more interesting stuff. I can show code right now but this is not interesting. You will get original *.ms to put the rest of buttons functions to finish the tool.
solution
barigazy · 2013-06-07
Anyway I'm not fan of max docking system. So I try something here which can be very useful for tools that need to stay open all the time and use minimal space of working area. So if anyone interested how to make this kind of .net GUI (look attachment) please let me know. If minimum 3 people post comment here I will open new thread and explain step by step creation process. So up to you guys.
miauu · 2013-06-07
Don't wayt the people to post commnets. Thay maybe not read this thread. I am sure that this GUI can be done with pure maxscript(almost the same - borderless rollout, imgtag-s for small buttons, and the Icons can be generated in the script(light and radk scheme), and maybe one dotnet label for the tool name), but it is a good idea to show the dotnet solution.
:)
barigazy · 2013-06-07
Hey Kostadin,
this is the pure .net solution. It will be good example for anyone who want to learn or start to learning mxs+.net. This forum not have many examples about this topics. My code is not perfect but if the other members are involved then we can always create better tool.
tassel · 2013-06-07
Interesting stuff barigazy, i'm not into .net stuff, but i love the GUI you did here :)
barigazy · 2013-06-07
Thanks tassel. This does not mean that you're not interested, as well.:)
wow
artrender.info · 2013-06-04
so many files there! Very confusing where is the part which deals with gui, I mean a simple form where you have to put your code in order for it to work!
miauu · 2013-06-04
You can read all files, they are not encrypted. But, the author of the Outliner uses custom controls(in outliner.dll file), so you can't create them with pure maxscript.
I still
artrender.info · 2013-06-03
couldn't find any piece of information about outliner! please, show us an example!!!
barigazy · 2013-06-03
miauu · 2013-06-03
Outliner is a beter Layer manager for 3ds max and much much more. Nested layers, hierarchy mode, material mode.... just try it. For max2014 you have to modify the startup file, because max2014 can't dock rollouts with dotnet controls in it. I montoined the Oitliner, because it have dotnet controls and you can install it on max2014, but without the modification of the startup script of Outliner you can't run max2014. The problem is the reason of this thread. :)
barigazy · 2013-06-03
When Autodesk published max2k14 I was just wondering what is the new about MXS and .NET. This is the great news, I'm happy now :(.
Even some of AD developers use Outliner in their workflow. First "Active Type" [X] and now Outliner. What's next?
I was talking about
artrender.info · 2013-06-03
Outliner! I still didn't understand what is it! Can it be used somehow instead of rollout, or I missunderstood this? About max, I agree, and only about max - all thigs in this world become worse. And even the quality of people! It's good that in this forum there are good people :) - I HOPE!!!
and now
artrender.info · 2013-06-03
can you talk more about that please?
barigazy · 2013-06-03
Talk about what? We can talk more then week about max2k14 new "features" ei.bugs. :)
barigazy · 2013-06-03
theses are new "features" from earlier http://ruramuq.blogspot.com/2012/04/3dsmax-dying-software.html
Yep, MAx2014 can't dosk
miauu · 2013-06-03
Yep, MAx2014 can't dock/undock rollouts with dotnet controls. Crash every time. You can try with Outliner.
barigazy · 2013-06-03
whether the outliner works? I did not try jet.
wow, it's working!
artrender.info · 2013-06-03
dotNet.loadAssembly @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\WindowsFormsIntegration.dll"
rollout wpfRefresh_RLT "" width:70 height:220
(
dotNetControl eh "Integration.ElementHost" width:70 height:500 align:#left offset:[-14,-5]
local doRefresh = true
on wpfRefresh_RLT open do
(
uc = dotNetObject "System.Windows.Controls.UserControl"
eh.child = uc
sp = dotNetObject "System.Windows.Controls.StackPanel"
for i = 1 to 10 do
(
btn = dotNetObject "System.Windows.Controls.Button"
btn.height = 20
btn.content = "button " + i as string
sp.children.add btn
)
uc.content = sp
)
-- refresh the elementHost whenever it's "Paint" event is triggered
on eh Paint args do
(
if doRefresh then
(
doRefresh = false
eh.refresh()
doRefresh = true
)
)
)
createDialog wpfRefresh_RLT style:#(#style_toolwindow,#style_sysmenu,#style_resizing)
cui.RegisterDialogBar wpfRefresh_RLT style:#(#cui_floatable,#cui_dock_left,#cui_handles )
cui.DockDialogBar wpfRefresh_RLT #cui_dock_left
it can be placed on the left or right! It's already a good begining! I don't just know how to place it on top menu like in my picture! If it's difficult I can refuse from this idea!
barigazy · 2013-06-03
Max2014 crash when you try this. Also try to undock now if you can :)
to dock on the top
cui.DockDialogBar wpfRefresh_RLT #cui_dock_top
with
artrender.info · 2013-06-03
a single tool, I mean that whenever you want you can get them back from max menu, and they will remain connected! Some may prefer to put it vertically on the right or left hand!
barigazy · 2013-06-03
Rollout can't be put inside max menu only macrobuttons (not .net). But you can dock rollout as it is.Only problem is how to undock roll with .net buttons.That's tricky part. I suggest you to leave it as float dialog.
I posted on cgtalk a solution by James Haywood and DenisT also have en As in the pocket.
Take a look these thread. http://forums.cgsociety.org/showthread.php?f=98&t=1072695&highlight=Elem…
this is
artrender.info · 2013-06-03
a rollout with net buttons! In fact I can make them apart, for everyone a script apart because I need anyway hotkeys, however, If it is possible to keep them like a single tool, all together, to be able to assign hotkeys for every button and be able to apply it to the maxmenu, it would be the best option :)))
barigazy · 2013-06-03
Are theses macro buttons or you have rollout with mxs butons or .net buttons?