PDA

View Full Version : SetFocus on modelPanel from external HTML window


diskhub
10-11-2006, 01:38 PM
Hi, I am using Maya 8. Due to the fact that maya has removed the support of webpage browser in maya itself, and introducing a plugin for external webpage, I have begun to create my webpage system so that it can let users interact with the maya object via the webpages.

Currently I am writing a HTML UI for my rig so that my friends and I can animate our characters easily by selecting the hotspot areas on the images

However i had been trying to do a setfocus to bring the focus by to the mayawindow so that animators can adjusting the position or the values of the selected joints.

I tried and embed the following script inside java script:

setFocus `getPanel -withFocus`

However though the mayawindow seems to be active and selected, I still can't press those hotkey like W,E,R to move, scale and rotate them...


Following is the Javascript function which i will embed them after each click the user has clicked:

function winFocus(){
MEL_Execute('setFocus \`'+'getPanel -withFocus'+'\`; refresh -f -cv;'
}

However, it still does not work on Maya 8. However, it works perfectly in maya 7 or earlier. Any experienced guy can enlighten me?

Robert Bateman
10-12-2006, 04:23 PM
use mel. Don't expect HTML to work very well in 8 since the support has been dropped. It's also very tied to what browser/platform you are using, and whether you've bothered to install the plugin. If you want it to work in 7,8 & 9 (whever that comes out), mel is the solution. (or even better, just create some decent animation controls to begin with, and stick everything else in a read only layer - it's a far quicker way to animate a rig)

diskhub
10-13-2006, 02:09 AM
use mel. Don't expect HTML to work very well in 8 since the support has been dropped. It's also very tied to what browser/platform you are using, and whether you've bothered to install the plugin. If you want it to work in 7,8 & 9 (whever that comes out), mel is the solution. (or even better, just create some decent animation controls to begin with, and stick everything else in a read only layer - it's a far quicker way to animate a rig)

It's very sad to hear that there's so many conflict from 7-8 after autodesk bought over.
It just serves no purpose to have a support for web when it doesn't work for such a simple command to transfer the focus from the web browser to maya application.

Any idea how can I report this bug to AutoDesk. I am working in a corporation and I don't think I can register for platinum membership.

CGTalk Moderation
10-13-2006, 02:09 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.