Sript tab
All  1-3  4-7

Previous
Next
 From:  Michael Gibson
7072.4 In reply to 7072.3 
Hi Andrei, to integrate the script palette you need to copy the content of the script palette code over into the BrowserPane.htm file using a text editor.

Open up ScriptPalette.htm and select all the child content inside of its <body> tag, it will be one long <script> element that you will need to select. Then use Ctrl+C to copy that text to the clilpboard.

Then paste that <script> element into the BrowserPane.htm file, before the closing </body> tag there.

That will then make the script palette directly embedded in the browser pane. But the existing script palette code was meant to be used on a pop up dialog though and it includes code that closes the window that the menu items are on when it is clicked. You will want to remove that part since you will not want the main window to close when the menu items are clicked. To do that find the section of the script code that has onclick="moiWindow.endDialog(0);" and change it to say onclick="" or remove the whole onclick handler.

- 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:  Andrei Samardac
7072.5 In reply to 7072.4 
Thanks!

____________________________________________________________________
My Portfolio: www.samardac.com
A lot of my Tutorials!
Subscribe to my youtube channel: http://www.youtube.com/samardac
Russian community of MOI 3D: www.vk.com/moi3d
  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:  Andrei Samardac
7072.6 In reply to 7072.5 
How to make bodies save their state (coollapsed or not)?
Also how to allign this body to bottom?
I attuched my Sidepane.

EDITED: 24 Nov 2014 by ANDREI SAMARDAC

Attachments:

  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:  Michael Gibson
7072.7 In reply to 7072.6 
Hi Andrei,

> How to make bodies save their state (coollapsed or not)?

There is nothing currently built into the palette controls to make them remember their states in between program sessions. It might be possible to add it in yourself with some script code that called moi.command.setOption( 'myoptionname', value, true); and var value = moi.command.getOption( 'myoptionname', true ); to set and get the saved state, the 2nd parameter of true means to load the option from the moi.ini file.

There are some script functions inside of SidePaneTabs.js that deal with expanding and collapsing palette tabs, you would need to study that file and use the same techniques in your own script code.



> Also how to allign this body to bottom?

Put the elements that you want to be at the bottom to be inside the last
element in the sidepane, the one that currently contains a <moi:ShowHideStateButton> for opening and closing the scene browser. That section of UI is already set to align to the bottom of the side pane, and any stuff contained within it will be located next to that bottom "Browser" button.

- 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4-7