add elements to an object
 1-20  21-40  41-60  61-66

Next
 From:  noskule
3830.1 
Hi List
Is it somehow possible to add elements to an existing object. The only way I could figure out is to give the element the same name as the name of the object I want add it to.

Is the a way to do this with a clock/shortcut to the object name in the object-list instead to write the whole name into the "element" box.

Thanks for any hints
nos
  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
3830.2 In reply to 3830.1 
Hi nos, what is it that you mean exactly by "adding an element" ? There isn't really anything in MoI that is referred to by that particular term "element"...

For assigning names, one thing that could be useful is the script mentioned here (3rd post in the thread):
http://moi3d.com/forum/index.php?webtag=MOI&msg=3375.1

That script will name objects based off of selection - you select some unnamed objects and also select an object that has a name. Then when you trigger the script that name will get assigned to the unnamed objects.

There isn't currently any way in the regular UI to do that kind of "assign to an existing name" with just one action (like pick it off of a list or something like that), but I do want to add it in the future, probably on a drop-down menu in the scene browser.

- 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:  noskule
3830.3 
Yes, the post of hairykiwi exactly describes it. I installed the script and it works.
Thanks Nos
  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
3830.4 In reply to 3830.3 
Hi Nos, I'm glad that other script was useful.

Also I've cooked up a different plug-in as well which I have attached to this message. This one shows a dialog that has a list of all the existing object names in it, so you can then double-click on one of those names in the list to assign that name to the selected objects.

It looks like this:



To use it, download the AssignName.zip file attachment from this post, unzip it and copy the 2 files into the \commands sub-folder inside of MoI v2's main installation folder.

That will then add a new command called AssignName. In order to trigger it you will need to set up a keyboard shortcut under Options > Shortcut keys. Add in a new entry and for the key part put in whatever key you want to trigger it, and for the command part put in AssignName

Then to use it, first select the objects that you want to be renamed, and then trigger the shortcut key and that list of existing names will pop up. Double click on the one you want and the selected objects will get that name.

This should help for this kind of a thing for the time being, in the future I think this will get integrated into the scene browser where there is already a list of object names under the "Objects" section, and probably there will be a little menu that you can pop out for a name and pick a menu item that says "Assign to this name". But until then this AssignName plug-in command will do that same kind of job.

- Michael

EDITED: 26 Oct 2010 by MICHAEL GIBSON


  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:  DannyT (DANTAS)
3830.5 In reply to 3830.4 
This'll come in handy Michael, I like it when you cook stuff up on the fly, there should be a coding version of 'Iron Chef' you'd be one of the 'Iron Coders'.....and today's mystery ingredient is....Obfuscated code.

Oh yeah! what's a JoJo?

Cheers
~Danny~
  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:  Frenchy Pilou (PILOU)
3830.6 
<< "that list of existing names will pop up"
this list is the list of names yet existing in the Moi cession or that can be an external list where we can pick any names? (file .txt for example)
---
Pilou
Is beautiful that please without concept!
My Gallery
  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
3830.7 In reply to 3830.5 
Hi Danny, yeah it's pretty cool that MoI is flexible enough to cook up stuff like this, I actually initially kind of forgot that it should be possible to do a plug-in that added a pick list like this.

> Oh yeah! what's a JoJo?

This is JoJo:



Sometimes she supervises the code writing.

- Michael
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
Next
 From:  Michael Gibson
3830.8 In reply to 3830.6 
Hi Pilou,

> this list is the list of names yet existing in the Moi cession
> or that can be an external list where we can pick any
> names? (file .txt for example)

The one posted previously is a list of existing object names in the model.

I've attached here a different version which will read in the list of names from a text file named PresetNames.txt which should be put in the same \commands sub-folder.

Then edit the PresetNames.txt file to control the list of names.

The command name for this one is AssignPresetName, instead of just AssignName.

- Michael

EDIT: updated attachment to fix problem with hard-coded "c:\Program Files" path to text file.

EDIT2: see here for a version that will work on a Mac: http://moi3d.com/forum/index.php?webtag=MOI&msg=3830.59

EDIT3: added new version that will work with v3, old version for v2 renamed.

EDIT4: For MoI v4, see instructions here: http://moi3d.com/forum/index.php?webtag=MOI&msg=9717.9

EDITED: 9 Mar 2020 by MICHAEL GIBSON


  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:  BurrMan
3830.9 In reply to 3830.7 
""""This is JoJo:
Sometimes she supervises the code writing."""""""""""

Sometimes bites into the cables, which weaken the lower supports , which HAS a name, that refers to the upper structure! :o
  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
3830.10 In reply to 3830.9 
Hi Burr, yup, she does seem to think that some cords are delicious, we've got extra stuff around all the cords to stop her from chomping through them.

- 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:  DannyT (DANTAS)
3830.11 In reply to 3830.10 
wascally wabbit!

-
~Danny~
  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:  FiL (FILIPPOL)
3830.12 In reply to 3830.8 
Hi Michael,

>I've attached here a different version which will read in the list of names from a text file named PresetNames.txt which should be put in the same \commands sub-folder.

1-I've inserted the command "AssignPresetName" inside the commands folder.




2-I've changed your generic list in a personal list.




3-I've assigned the short key to the new command.
But it doesn't work. It doesn't found names in PresetNames.txt file




Is there an error in what I did?
Did I put the .txt file in a errate place?

FiL

___________________
That's a brilliant day!


  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:  coi (MARCO)
3830.13 In reply to 3830.12 
hi there..

i get this error..

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
Next
 From:  Michael Gibson
3830.14 In reply to 3830.12 
Hi FiL, do you possibly have your "Program Files" folder on some drive other than the C: drive?

Right now there isn't any way set up for a script to know where MoI is installed, so this command just assumes that it is installed in C:\Program Files\MoI 2.0 , or C:\Program Files (x86)\MoI 2.0 .

So if you have it installed somewhere else (like on the D: drive or something like that) you'll need to edit the command so it can find the file. To do this, open the AssignPresetNameDialog.htm file up under notepad, and go to the spot that says:

if ( i == 0 )
    filename = 'c:\\Program Files\\MoI 2.0\\commands\\PresetNames.txt';
else
    filename = 'c:\\Program Files (x86)\\MoI 2.0\\commands\\PresetNames.txt';

And change the folder there to go to your actual "Program Files" folder, and then that should make it work. Note that in a script string, a \ character starts an escape sequence (like \t means a tab character), so you need to put in a double \\ to make an actual single \ character in a script string.

I've made a note to make a method available for scripts to call so they can know the folder where MoI.exe is running from so that when a script wants to load a separate data file like this it will be able to work more easily.


Let me know if that was not the problem.

- 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:  Michael Gibson
3830.15 In reply to 3830.13 
Hi Marco,

> hi there..
>
> i get this error..

That's a bug in the script file for the case where it could not read in the data file.

I've uploaded a new attachment to the previous message which should not give this error anymore, but to make it find the text file you probably need to edit the path to it in the AssignPresetNameDialog.htm file as described above.

- 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:  FiL (FILIPPOL)
3830.16 In reply to 3830.14 
Hi Michael, sorry but it's not my case.

C:\Programmi\MoI 2.0\commands




I've controlled all the steps.
If the file .txt must be in commands folder, nothing is wrong... or
there is a allien intelligence inside my pc that....
Now I go to a pet shop and I buy a my Jojo!

FiL

___________________
That's a brilliant day!

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
Next
 From:  Michael Gibson
3830.17 In reply to 3830.16 
Hi FiL,

> C:\Programmi\MoI 2.0\commands

Ah, but that is the problem, because the script is hard coded to look for it in

c:\Program Files\ (in English)

So you will need to edit the file as mentioned above. To do this, run notepad and open up the file AssignPresetNameDialog.htm and edit the line that says:

filename = 'c:\\Program Files\\MoI 2.0\\commands\\PresetNames.txt';

and change it to say:

filename = 'c:\\Programmi\\MoI 2.0\\commands\\PresetNames.txt';

Then it should work.

I've attached a version with it edited like that, if you copy the attached file over top of the previous one, does it then work for you?

I can probably figure out a way for the script to find that better, I'll take a look.

EDIT: This is fixed now in the updated version, it should find your machine's "Program Files" folder now.

- Michael

EDITED: 27 Oct 2010 by MICHAEL GIBSON

  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:  FiL (FILIPPOL)
3830.18 In reply to 3830.17 
Hi Michael, that's good.
Now it works.

Thank you... and JoJo!

FiL

___________________
That's a brilliant day!

  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:  coi (MARCO)
3830.19 In reply to 3830.17 
hi michael

i'm on D: as main drive..editing the AssignPresetNameDialog.htm did the trick..everything's working fine now..

best wishes,
marco

p.s. gsus, it must be around 4am in your area..i hope jojo doesn't mind :]]]..btw. jojo does look a bit like the Stanford bunny, doesn't she...you haven't got a Dragon lying around somewhere? :]]]
p.p.s. this would also be an appropriate work flow for assigning commands to shortcuts keys..like scanning the commands folder for available commands..

EDITED: 27 Oct 2010 by MARCO

  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
3830.20 In reply to 3830.19 
Hi Marco & FiL - I've figured out how the script can get your own system's "Program files" folder properly, and I've updated the original attachment again. But it sounds like you've got things working anyway.


@ Marco:

> p.s. gsus, it must be around 4am in your area..i hope jojo doesn't mind

Only 2am currently, JoJo kind of likes late night stuff, there is less chasing from toddlers.


> p.p.s. this would also be an appropriate work flow for
> assigning commands to shortcuts keys..like scanning
> the commands folder for available commands..

Yeah, but probably it needs more than that, I'd like to tune up the whole way that plug-ins are delivered so that you could go to a kind of plug-in browser that would connect to a repository on the web site and you'd be able to pick ones to download. Then they'd probably download to a central folder like moi.ini so you wouldn't need to re-install them during new beta releases or new version releases. Then that whole thing would be good to connect up with a list in the shortcut key editor as well.


> you haven't got a Dragon lying around somewhere?

I've got a little Dragon statue that is really similar to that one, but not any real Dragons though nope... :)

- Michael

EDITED: 27 Oct 2010 by MICHAEL GIBSON

  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:  1-20  21-40  41-60  61-66