Script for quickly changing the theme from dark to light

Next
 From:  Brianfox90
11307.1 
Help please. Two scripts are needed. The first script for quickly changing the theme from dark to light. The second script for quickly opening the "details" window
  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
11307.2 In reply to 11307.1 
Hi Brian,

Set dark theme:
script: moi.ui.theme = "Dark";

Set light theme:
script: moi.ui.theme = "Default";

Open "Details..." dialog:
script: moi.ui.createDialog( 'ObjectPropertiesDialog.htm', 'resizeable,defaultWidth:700,defaultHeight:500' );

- 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
Next
 From:  Brianfox90
11307.3 In reply to 11307.2 
Thanks, 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
Next
 From:  Brianfox90
11307.4 
Where can I see what classes are in Moi in order to write scripts myself?
  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
11307.5 In reply to 11307.4 
Hi Brian,

re:
> Where can I see what classes are in Moi in order to write scripts myself?

There isn't currently official documentation for the scripting API, because that takes a lot of work.

However, there is some information here:
https://moi3d.com/wiki/Scripting

Also though if you want to script something that is in the regular UI, you can open up the UI files and find how it is accessed.

For example the UI control for changing the theme is in GeneralOptions.htm inside the UI folder in the install. If you look in there you can find that it sets it using moi.ui.theme = value;

- 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
Next
 From:  Brianfox90
11307.6 In reply to 11307.5 
Thanks for the answer
  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:  Larry Fahnoe (FAHNOE)
11307.7 In reply to 11307.6 
Hi Brian,

In addition to Michael's answer, here is another very worthwhile contribution toward API documentation for MoI:
https://moi3d.com/forum/index.php?webtag=MOI&msg=10857.36

--Larry
  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:  Brianfox90
11307.8 In reply to 11307.7 
thank you very much!!!!
  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