HHbomb wrote:thanks for answer, but it seems to do Nothing.
You must have done something wrong. it works.
Create a new box
Right click - object settings go to user defined. There should be no text there.
select the object
write this in the listener and enter.
setUserProp selection "octane_movable_proxy" true as string
Again go to object properties you'll see the variable there.
Ok.
Let me clear this out. That it not that easy to do. I made it work with my script. But every time I deal with it I forget all my findings everytime.
Since there is no direct object setting that enables or disables the moveable proxy setting This is done via object properties in max, under the "User Defined" tab aka. User Defined properties.
So first you should be get current user defined values as string
On a newly created object that section is completely empty.
If you plan on creating a button to control the objects moveable proxy property.
So you should create an if clause in your script.
So ask the object whether or not has the string such as
Code: Select all
getUserProp $ "octane_movable_proxy"
This will give you undefined, true or false
undefined - means there is no variable set octane_movable_proxy (I mean the user defined section is empty
True meaning user defined section has the octane_movable_proxy = true line there.
False means octane_movable_proxy = false is written there.
So first you should get the properties. check if there is octane_movable_proxy in the properties.
Then make (say)a button or checkbox to drive that code. If there is no proxy info in the object then the button is closed. if true that enable button.
These are some codes that will help you start from somewhere.
Code: Select all
--This below code has to be in a function that needs to be rerun or refreshed every time you select a new object.
fn updateRefresher =
(
for A in selection do
(
if getUserProp A "octane_movable_proxy" == undefined then BUTTONNAME.checked=false
if getUserProp A "octane_movable_proxy" == True then BUTTONNAME.checked=true
if getUserProp A "octane_movable_proxy" == False then BUTTONNAME.checked=false
)
)
.
.
.
-- The code for the button or checkbox
on BUTTONNAME changed status do
(
if status == on then (setUserProp selection "octane_movable_proxy" true as string)
else
(setUserProp selection "octane_movable_proxy" False as string)
)
There is no one code type thing for this to work great.
You may also use my script for that.
Here is the link
viewtopic.php?f=27&t=49724&hilit=Octane+Shortcuts
Best,