Named Objects design proposal
All  1  2-8

Previous
Next
 From:  Michael Gibson
7108.2 In reply to 7108.1 
Hi Robert welcome to MoI and to the forum!

I think it would be possible to implement much of what you're describing in MoI as a script, if you'd like to try to do the implementation some existing scripts that do part of that functionality are here:

AssignName - set the name of an object from a list of existing named objects:
http://moi3d.com/forum/index.php?webtag=MOI&msg=3830.4

AssignPresetName - set the name of an object from a fixed preset list of names in a text file:
http://moi3d.com/forum/index.php?webtag=MOI&msg=3830.8

Those ones are close to the functionality that you are asking about and so they would probably be your best bet as a starting spot for modifying it to get your desired design.

Probably a couple of the details of your proposed design would be difficult to implement currently with scripts though, especially the part about the dialog staying open and changing in response to changing selections. There is not really any mechanism set up for scripts to get notified when the selection changes.

Also unfortunately a lot of the things that deal with styles, like the Edit Styles dialog pretty much rely on internal helper functions to do stuff, so some of those things are not as easily reusable for other purposes as it sounds like you're expecting...

But anyway the AssignName and AssignPresetName plug-ins from the above links will get a major portion of what you're describing working for you right now.

In the future I want to make it easier to assign to existing names using some method in the scene browser itself...

- 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:  RobertH
7108.3 In reply to 7108.2 
Thanks for your reply Michael!

Can you point me to any scripts that are dialogue boxes like one of the ones you mentioned but have several tabs like the side panel. Can a dialogue script contain more than one control? And any scripts that have a checkbox whose value can be read by the script? Thanks!
  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:  RobertH
7108.4 
Michael, just as an aside, I was born in Holland but now live in San Diego... Mooi in dutch means beautiful.
  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
7108.5 In reply to 7108.3 
Hi Robert,

> Can you point me to any scripts that are dialogue boxes like one of the
> ones you mentioned but have several tabs like the side panel.

I'm not aware of any script that has those kind of tabs in it, but you can use the same tab control that the side pane uses. You'll find the side pane code inside the \ui sub-folder, in the file SidePane.htm. If you look in there you'll see some tab controls, like for example here is the one for the Draw curve / Draw solid tabs:

code:
	<moi:Tabcontainer>
		<moi:TabButton id="DrawCurveTab"><moi:Text textid="Draw curve tab"/></moi:TabButton>
		<moi:TabButton id="DrawSolidTab"><moi:Text textid="Draw solid tab"/></moi:TabButton>
	</moi:Tabcontainer>


The <moi:Tabcontainer> element has an activeTab property that can be referenced on it, and it fires an ontabchange event when the tab changes, if you put an ontabchange="" event handler on the tab container that will get called when the tab control changes and you will then want to look at the tab control's activeTab value and show or hide other stuff depending on that value.


> Can a dialogue script contain more than one control?

A dialog can have any number of controls on it.


> And any scripts that have a checkbox whose value can be read by the script? Thanks!

A checkbox control can be placed by using a <moi:CheckButton>button text label</moi:CheckButton> control. Give the control an id="" value like id="mycheckbox" and then the value of it can be read in script by retrieving the .value property, like mycheckbox.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:  RobertH
7108.6 In reply to 7108.5 
Thanks so much! Really appreciate the help.
  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:  RobertH
7108.7 
Another question Michael, is there a visual editor for working on the dialogue boxes, or is it all text based and try in MoI?
  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
7108.8 In reply to 7108.7 
Hi Robert, sorry no there is no visual editor it's all just edit in a text editor and test it with MoI.

It is helpful to set DisableFileCaching=y inside of moi.ini to make MoI reload files on every run rather than caching them in memory like it will do by default, see here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=6727.2

- 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  2-8