Viewpoint Forums
Viewpoint Forums
Other Viewpoint Software
Accessing MTSCamera through VETScript|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
OK guys, please help me on this, I've been stumped for almost 3 days on this problem.
Is it possible to access the default MTSCamera properties (translate, rotate, orbit, etc.) through VETScript? I've tried several possible combination with no avail: alert(MTSCamera); == MtsRuntimeCamera alert(MTSCamera.Translate); == undefined alert(MtsRuntimeCamera); == MtsRuntimeCamera alert(MtsRuntimeCamera.Translate); == undefined alert(MtsRuntimeCamera.Translation); == undefined alert(MTSCamera.MtsRuntimeCamera); == undefined (???) alert(MTSInstance.MtsRuntimeCamera); == undefined not to mention that on several occasions, a certain tag combination only results in a "disappearing scene" act, with me getting a blank viewpoint viewpoint... - Greg - |
||
|
|
EnIgMaTiCScOrPioN Member |
Hi !!
Try this.... alert(MTSCamera.rot_); OR alert(MTSCamera.rot_.x); Should work. Cheers, Anup |
|||
|
|
Member |
Nope, your answer did not work, the script didn't compile.
From what I gather, the script could not access MTSCamera at all (where is MTSDebugger anyway???) since a simple alert('test: ' + MTSCamera.rot_) would not work. Anyway, I found a workaround. To do manual camera animation through VETScript, access the camera through MTSScene, use crot property for camera rotation, ctra for camera transform/translation, and cdst for camera distance from pivot. ie. MTSScene.crot.x would return the camera rotation around the x axis, etc. Dear Dev Team, What I want to ask is... <!-- ___ begin rant-fume-flame ___ --> why can't I access MTSCamera properties, what the hell is this property doing there, and why don't they appear ANYWHERE in the documentation??? In short, where the hell is the related properties (short notation) listing in the documentation??? The reference page USED to have them, albeit incompleteness, now they're totally gone This simple thing can be done in 1 MINUTE IF ONLY THE DOCUMENTATION IS COMPLETE ENOUGH TO AT LEAST LIST THEM! Don't give me the "Please use Enliven" crap line, you know well enough that Enliven is barely enough to do ANY advanced animation jobs, hell, I can't even import a .tga complete with its transparency intact. <!-- ___ end rant-fume-flame ___ --> Seriously, please increase the documentation quality. VETScript is a very big leap in your software quality, as it opens up a lot of possibilities, especially to scripter/programer like myself who hates fiddling around with arcane XML stuff. But how can we do anything if there's not even a single complete script reference in this planet? My suggestion is: - A totally separate reference web page for VETScript. - A complete list and description of each and every object and their properties, a sample code is a plus. - A list of every Javascript objects and/or methods VETScript support, a description is a plus. - Everything is arranged in a hierarchial format. - Greg - |
|||
|
|
EnIgMaTiCScOrPioN Member |
Hi !!
See attachment. When this works for me, why not you Cheers, Anup Gregorius.zip (8 KB, 26 downloads) |
|||
|
|
Member |
That's weird then, because it doesn't...
It either gave me erratic numbers (huge numbers like -4900, -4900, -4900) or it doesn't work at all. Any ideas? |
|||
|
|
EnIgMaTiCScOrPioN Member |
Hi !!
Check the following: 1) <MTSScene Version="330"> The Scene version should be 330 2) <MTSTimeElem Type="VETScriptInterpreter" /> The VETScript Interpreter 3) Are you having the latest 330 player installed? 4) Are you using the latest MTS3Interface.js file? If not, there is a new version released. Please check the NEWS section on the home page of the Viewpoint Developer Central. Hope this helps. Cheers, Anup |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
Viewpoint Forums
Viewpoint Forums
Other Viewpoint Software
Accessing MTSCamera through VETScript
