Error: unknown property
Hello
I worked on the camera parameters interface and ran into a problem.
The interface does not start if the camera is not selected. (Unknown property)
Tell me how to fix this?
Can I see changes in camera settings in my interface?
Thanks :-)
Attachment | Size |
---|---|
cam_parameter-error.ms | 1.5 KB |
Comments
.
You have to edit your code, because when you change values of any of the spinner if the selected object is not your camera you will get an error.
Tools and Scripts for Autodesk 3dsMax
Hi Miauu, Thank you so much
Thanks again, the script works.
When the interface starts, I see the camera’s parameters if it is selected. When choosing another camera, I do not see its parameters.
Can I update the interface data when changing the camera?
If yes, please tell me how to do this?
.
Tools and Scripts for Autodesk 3dsMax
Thank you very much
I managed to add data synchronization by your records. Now my interface is fully performing the task. Thanks so much for your answers, they help me study MaxScript.
Please tell me how to reset the interface data when resetting the target?
.
What do you mean by "resetting the target"? When no camera is selected?
Tools and Scripts for Autodesk 3dsMax
Yes
Scheme:
1) camera selected - data is updated.
2) no camera is selected (target reset) - the data is updated.
In the second case, if the target is reset, I want to see the data = 0
Just as when running a script without selecting a camera, we see data = 0
For example: I added the name of the camera to the interface - when I reset or select, I can see the changes in the name by analogy with the parameters. If nothing is selected, I will see "nothing"
Thanks
.
Tools and Scripts for Autodesk 3dsMax
Thank you
Works great.
When I create a camera, the data is updated.
When I delete the camera, the data is not updated.
I tried to add an interface update when using the delete function - it did not work.
fn (...)=
(
if selection.count <1 then ResetData ()
else
(
if actionMan.executeAction 0 "40020" then ResetData ()
)
)
Or should it be written differently?
Thanks.
.
you can use same callback function for added / deleted / selectionChanged events of NodeEventCallback system
Thanks
It helped. I managed to add these events to the function.
Thank you so much for your help.