Show messages:
1-7
8-27
28-47
48-49
From: Frenchy Pilou (PILOU)
And possibility to save the Helpers lines in a file?
From: Michael Gibson
Hi Paul,
> I don't know if that's a bug or not, but if it is, it's maybe a "good" bug.
I see - what's happening here is when you click down on a construction line it is getting selected (even though the appearance does not change), and then it is trying to drag it like a regular object. However, clines don't support some of the other infrastructure for getting transformed yet, so that's why they get deleted. But this is easy to tweak, I've tuned this up so that the line will actually drag in this situation (and you can also apply any of the transform commands on them).
You can still remove it by clicking it and then using Delete.
But these are some of the reasons why there isn't an "official" persistent construction line yet - you probably don't want them to get selected like regular objects, but there isn't currently any way to lock an object to prevent it from being selected and still remain snappable.
- Michael
From: Michael Gibson
Hi Pilou,
> And possibility to save the Helpers lines in a file?
This one will have to wait for V2...
- Michael
From: Paul (AIRGLASS)
Hi Michael,
I see, interesting. Thanks for the explanation. Sounds good to me!
Paul
From: Frenchy Pilou (PILOU)
An other Helper lines like circles, arc, rectangle...? ;)
From: Michael Gibson
Hi Pilou,
> An other Helper lines like circles, arc, rectangle...? ;)
I haven't been planning on it, that would tend to add quite a lot of extra commands.
A construction line is kind of a special case since it extends infinitely in either direction unlike a regular line. So it offers something extra than just a regular line.
A "construction circle" wouldn't really offer anything similarly extra to a regular circle.
In version 2 I would like to make it possible to lock objects to prevent them from being selected, but remain snappable. At that time you would be able to draw a circle, set it to have a dashed line style, and then lock it and that would end up being the same thing as a construction circle.
- Michael
From: Paul (AIRGLASS)
And on the silly side of things.....
If someone's got the AutoRotate2 script installed, here's a time waster :
activate the construction line script
draw a few lines in each viewport
click a viewport to keep the lines and exit
maximize the 3d viewport
turn on the autorotate2 script
and it's
MoI -- "It's a screensaver too!"
Paul
From: Schbeurd
@ Paul,
Another excellent script here ! It's really cool to have permanent construction lines ! ;-)
@ Michael,
>>> In version 2 I would like to make it possible to lock objects to prevent them from being selected, but remain snappable. At that time you would be able to draw a circle, set it to have a dashed line style, and then lock it and that would end up being the same thing as a construction circle.
Yeah ! Good idea. It's similar to a feature in Illustrator. I'd really like to see your "feature list" for V.2... ;-))
From: Dymaxion
So, it's been quite a while and I'm assuming the code has bit-rotted a bit, but I'm trying to use the ConstructionLine.js script from this thread, and when I try to launch it, I get a JScript error, "Object expected Line 6: Column 1". I'm fairly certain it's set up correctly, and I can't figure out which line it's talking about. Ideas?
/Ella
From: Michael Gibson
Hi Ella - which version of MoI are you trying it on?
I just tried it over here with the latest v2 beta (Apr-12-2009 release) and it seems to work fine for me.
You mentioned the "ConstructionLine.js" script - do you mean you only have that one file? There should be 2 files included in the .zip, a .js file and an .htm file.
You'll need to copy both of those files (not just the .js file) to your \commands sub-folder, then set up a shortcut key that says: ConstructionLine as the command.
Let me know if you've done all that and still have problems.
- Michael
From: Dymaxion
Current beta. I was trying to link to the command as "ConstructionLines.js"
Here's a slightly cleaned up version of the code script, with instructions for adding it to a conveniently empty slot in the "Edit" tab.
It'd be nice to have a "Done" button for the script, instead of the "click on the viewport" bit, which is a bit too easy to trigger accidentally. I know this is kind of abusing a line factory to make things work; is it possible to create that behavior?
EDIT (7/11/2015): The attached instructions are for v2 - for MoI v3 the way icons are set up on buttons is slightly different and so for setting up the button in v3 put in this instead:
code:
<td><moi:CommandButton icon="icons/CLIcon.png" command="ConstructionLine">CLine</moi:CommandButton></td>
Attachments:
ConstructionLine.zip
From: Michael Gibson
Hi Ella,
> It'd be nice to have a "Done" button for the script, instead
> of the "click on the viewport" bit, which is a bit too easy to
> trigger accidentally.
Give the version attached here a try - I added a Done button to this version. This one won't exit if you just click with a left-click, you end it by clicking the Done button or using one of the shortcuts for Done (right-click in a viewport or the Enter key).
The line factory part wasn't actually doing anything here, I think it was some left-over remnant from this having started out originally as a modification of the line command or something like that.
The actual meat of creating the construction lines was happening inside the GetPoint() call, which is set up to wait until a point is picked and then return. In this version I replaced that call to a manual event loop so it can respond to getting the "done" event.
Let me know if this one doesn't do what you wanted.
- Michael
Attachments:
constructionline2.zip
From: Satoribomb
Ah thank you Michael! The script and instructions worked flawlessly for me (an HTML challenged soul). THis will help enormously with my current projects. Will this CLine script function/feature become a permanent part of MoI going forward or will it remain an end-user add-on?
From: Michael Gibson
Hi Satoribomb, I'm glad you got it all set up!
At the moment I'm just planning on having this as an optional add-on. In the future I would like to make it easier to manage plug-ins though.
- Michael
From: Dymaxion
Yes, it's great! Thanks for the update. One more question -- is it possible to have undo work while editing CLines? I.e., I lay down two lines, hit undo, have the most recent one go away, and then lay down another?
From: Michael Gibson
Hi Ella,
re: undo for clines - it's possible to set up a script that will remove the last placed cline, so that may work as a general "cline undo" that you could use either in this custom command or also at any other time you make a cline as well.
Setting up this script on a shortcut key should handle that:
script:var gd = moi.geometryDatabase; var clines = gd.getObjects().getConstructionLines(); if ( clines.length > 0 ) gd.removeObject( clines.item(clines.length-1) );
It should also be possible to alter this custom ConstructionLine command to have a "command-specific undo" in it which would allow it to respond to an undo event so it could handle a custom undo action during the command and it could do the same thing as above to remove the last entered cline. Let me know if you want me to make a new version that has that set up. But the shortcut key above is more general purpose since it will let you get rid of the last cline you created at any time, even if you are creating one while running some regular draw command instead of this special ConstructionLine command.
- Michael
From: Dymaxion
Yeah, I've seen the first command before. The command-specific undo is closer to what I was thinking of, but ideally, I'd want it to be triggered by the same keystroke/button as any other undo. It currently works in batches while outside of the command, which is fine, but the actual undo keystroke doesn't work at all inside the command. Would the command-specific undo bind to the standard undo keystroke?
/Ella
From: Michael Gibson
Hi Ella,
> Would the command-specific undo bind to the standard undo keystroke?
Yeah command-specific undo can be set by a command so that if an undo is triggered (by whatever method - either by ctrl+z or by clicking on the undo button), it will receive a custom event for it rather than the standard undo happening.
Attached here is another updated version of the ConstructionLine command that now has a command-specific undo set on it, so with this version you can hit Ctrl+Z or the undo button on the bottom toolbar to remove the last placed cline.
- Michael
Attachments:
ConstructionLine3.zip
From: Dymaxion
Perfect! Thanks much.
/Ella
From: bemfarmer
Just installed the cLine script in Moi3, and in Moi2.
Found that the instruction for installing the Icon for ConstructionLine3.zip,
for Moi3beta (windows), needs to be slightly different from the Moi2 version.
Replace empty slot in SidePane.htm:EditTabContent with: (just showing the changed portion because I
forgot how to label code, as code.)
Moi2 version.
...CommandButton style="icon:icons/CLIcon.png;"
Moi3 version.
...CommandButton icon="icons/CLIcon.png"
(Please correct if this is in error)
Show messages:
1-7
8-27
28-47
48-49