Getting camera view and restore it
All  1-9  10-12

Previous
Next
 From:  Samba Oleg (SAMBA_OLEG)
9356.10 In reply to 9356.9 
Hi Michael,

I always get the commas as the decimal separator. This is the return of the last script:

Camera=10,24 -20,48 10,24
Target=0 0 0

My system is set to German.

Samba
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9356.11 In reply to 9356.10 
Hi Samba, and that doesn't work to put in those comma decimal separator values in the dialog?

Here's another version that should make period decimal separators:

script: function str(pt) { return moi.ui.formatCoordinate(pt.x,2).replace(',', '.') + ' ' + moi.ui.formatCoordinate(pt.y,2).replace(',', '.') + ' ' + moi.ui.formatCoordinate(pt.z,2).replace(',', '.'); } var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); moi.copyTextToClipboard( 'Camera=' + str(v.cameraPt) + '\r\nTarget=' + str(v.targetPt) );

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Samba Oleg (SAMBA_OLEG)
9356.12 In reply to 9356.11 
Hi Michael,


it's a bit funny. The extended view angle dialog shows the camera and target position with commas on my system, but it only accepts the coordinates with a period decimal separator.

So, the last script solved the problem for me.

Thank you very much for spending so much time.


Samba
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-9  10-12