[Closed] reset creation panel
Hi All,
is there a max script way to reset the creation panel back to defaults ie the create > light>vray light panel or force max turn off that feature as its annoying !
b
So… Do you want to make create panel go back to geometry > Standard Primitive when you come back from other panel instead of where you were?
Then, No.
Nobody ? surely this must of come up
This
fn setColor n = n.wireColor= red
startObjectCreation box newNodeCallback:setColor
So you can create under the hood a call back to set values on object created after that all will be red. What happens if you manually set this on a vray light. Scanning the docs there seems to be no default or revert to default for the create / modify panel. It seems kind of pointless to script a lights entire parms with a set of defaults …
b
I can not understand your question.
Do you want to your object color be red all the time?
Then you can use general event callback #nodeCreated.
Or do you want to reset light wireframe color which you changed?
Than you can pull default light color from ColorManand assign as wirecolor property.
Thanks for the reply, new max user for a week ! . Create Panel > Light > vray light > before creating in the viewport > set the illumination colour to red > create the light .
Creation panel > create a second light > the second light > will be created using all the features set > prior to creating the first light in the viewport .
I want to set the values listed for the vray light back to defaults via some max script syntax. Currently if I pick up a scene that someone has used , run my light creation script , I get vray lights created using prior panel defaults.
Any ideas
b
Try this:
- create a vray liht with default parameters. Select it.
- in the Maxscript Listener type
show $
you will see all parameters that you can set. Get their default values and create a script that will set those values for created vray light(on object creation).
Thanks, I must admit that’s something I wanted to avoid … but what handy top to see all the parms available
bob
getPropNames will give you an array of property names of an object.
Then use Getpropery to get value.
Make an array of array #(propertyname, value)
print array as string
now you can execute the string later and get back array.
Then wither make a macro script to make a default vray light.
Or… you can make a node callback.
You can try also with UIAccessors.
Create vray light, select it and open Modify panel, so you can see all parameters of the light. Then execute this in maxscript editor:
(
for child in (windows.getChildrenHWND #max) where child[4] == "#32770" do
(
for classN in (windows.getChildrenHWND child[1]) where (classN[4] == "ModifyTask") do
(
for btn in (windows.getChildrenHWND classN[1]) do
(
format ": %
" btn
)
)
)
)
In the maxscript listener will be printed all controls, among with some other stuff. Now you have to find a way to set the values that you want to the parameters that you want. This way the changes have to be saved and next time when you create a vray light it have to have the default parameters(or parameters set by you).
In the forum you can find how to press a button, change checkbox/radiobutton state, set spinner value. I don’t know if there are examples of how to set the color and how to works with dropdown menu.
Other way is to ask in vray forums if it is possible to acheive what you want with simple script.