MoI discussion forum
MoI discussion forum

Full Version: Lots of unkown

Show messages:  1-5  6-25  26-45  46-65  66-85  …  366-372

From: Cemortan_Tudor
12 Nov 2017   [#6]
Small improvement workflow, deselects obects after point pressing hotkey
showpoints script

#include "GetObjects.js"

function DoShowPoints()
{
var AnyChange = moi.geometryDatabase.showPoints();

if ( !AnyChange )
{
moi.ui.beginUIUpdate();
moi.ui.showUI( 'ShowPointsBody' );
moi.ui.endUIUpdate();

var objectpicker = moi.ui.createObjectPicker();
if ( !GetObjects( objectpicker ) )
return;

moi.geometryDatabase.showPoints();
//moi.geometryDatabase.deselectAll();
}
}

DoShowPoints();
moi.geometryDatabase.deselectAll();
From: Cemortan_Tudor
13 Nov 2017   [#7]
16.? 3 edges to close surface
*** the way i'm doing know is selecting 2 -> loft, others 2 - network, and last one network ! lots of operations !

there was a video of car modeling, where he was trying to refine corners of modified fillet area (fillet intersection)
i will script it


31.? are any options for sliders/buttons on 3d viewport
initialisation menu for selection option, in moi can be applied as for creating objects, or bringing stuff from obj library - well script depended
https://vimeo.com/36732689
https://modelab.github.io/react-radial/
From: Michael Gibson
13 Nov 2017   [#8] In reply to [#7]
Hi Cemortan,

re:
> there was a video of car modeling, where he was trying to refine corners of
> modified fillet area (fillet intersection)
> i will script it

If you could post a 3DM file with what you're trying to do that would probably help me understand your question better.


> 31.? are any options for sliders/buttons on 3d viewport
> initialisation menu for selection option, in moi can be applied as for creating objects,
> or bringing stuff from obj library - well script depended

There isn't any option currently for a pie type menu. In general I've tried to avoid popping things right up in your face like that but it is somethng that I'd like to experiment with in the future.

- Michael
From: Cemortan_Tudor
16 Nov 2017   [#9]
thanks for your time
here's video, i wanna try myself, i have large list of implementation that i wanna do :) starting teaching scripting.
https://youtu.be/xr6WBeHbzK0?t=12m43s

clone selected objects

#include "GetObjects.js"
function cloneObj() {

var gd = moi.geometryDatabase;
var gds = gd.getSelectedObjects();
gd.deselectAll();
for ( var i = 0; i < gds.length; ++i ){
var newclone = gds.item(i).clone();
gd.addObject(newclone);
newclone.selected = true;
}
}
cloneObj();

Message 8665.10 was deleted


From: Cemortan_Tudor
21 Nov 2017   [#11]
mirrorX script of selected

Attachments:
_MirrorX.js


From: ganim3d
26 Nov 2017   [#12]
small script that makes model too look more toonish, it's hidding selected edges and puts under an object, for overall look!
I like this function !

here a grouping option will be nice to have, if no objects are selected to hide "hidden edges'.
cant do with objects(edges are part of object, not object itself) &
styles - that i preffer to remain the same.

Attachments:
_HideSelectedEdges.js


From: Unknown user
26 Nov 2017   [#13] In reply to [#12]
Hi gamin3d.

There is such a tool.

Vladimir
From: ganim3d
26 Nov 2017   [#14]
!scripting
can i detect point position of betweens of a curve ?
ex:
3 points curve, detect middle one(second) pt.x, pt.y. pt.z; (control point)
5 pt curve - 2,3 & 4'th pt pos

found only getEndPt, getStartpt
From: ganim3d
26 Nov 2017   [#15] In reply to [#13]
the idea was to combine under a group to keep always u'r preview clean
From: Michael Gibson
26 Nov 2017   [#16] In reply to [#14]
Hi ganim3d,

> can i detect point position of betweens of a curve ?
> ex:
> 3 points curve, detect middle one(second) pt.x, pt.y. pt.z; (control point)
> 5 pt curve - 2,3 & 4'th pt pos
>
> found only getEndPt, getStartpt

Sorry no right now the control point structure of curves aren't exposed to scripts, just the start and end points. I want to add that in for v4 though.


> the idea was to combine under a group to keep always u'r preview clean

You can assign object names or styles to face or edge sub-objects in MoI. When you give them a name an entry will show up for them in the Objects section of the scene browser so you can then toggle the visibility there.

- Michael
From: Michael Gibson
26 Nov 2017   [#17] In reply to [#15]
There are also some related edge/face hide or show scripts here:
http://kyticka.webzdarma.cz/3d/moi/#ShadedDisplayMode

- Michael
From: ganim3d
30 Nov 2017   [#18]
i like the idea from 3d coat, one click cutoff https://youtu.be/gp1TPRdeYnk?t=4m6s &
i've made a script that's focusing on cutting from 3d view

Attachments:
_PolyCut.js


From: Frenchy Pilou (PILOU)
1 Dec 2017   [#19] In reply to [#18]
Genious!

From: Cemortan_Tudor
1 Dec 2017   [#20]
i'm teaching from passed written scripts, couldn't find any info about
calculateCurveOrientation(ObjectList - curveList) return LIST
From: Michael Gibson
1 Dec 2017   [#21] In reply to [#20]
Hi Cemortan, some commands like Loft keep track of whether the curves used for building the surface needed to be flipped or have their "seam" start/end point (for closed curves) to be modified from the curve's own natural direction and seam point in order to avoid making a twisted surface. This information is stored in a factory input so that if the curves are edited and a history recalculation is done it will use the same orientations and seam points from the original loft (which may be customized by the user by clicking on a closed curve or dragging a point) rather than trying to make new ones.

Usually this is done automatically by the loft factory but the function you are asking about will build the orientation list manually, the list will have one CurveOrientation object per curve passed in, the curve orientation object (IMoiCurveOrientation in the moi.idl file) has "flipped" and "seam" properties on it.

- Michael
From: Cemortan_Tudor
9 Dec 2017   [#22]
I've made a script that extends tangecy by 2 units (for those who are using pipe, to extend current line by some extra units)
I'm bad at moi html and a binding ui will be later updated !

Attachments:
_extendTangency.js


From: Cemortan_Tudor
9 Dec 2017   [#23]
another script, same as in zbrush
quick snap 3d view to side/top/bottom other angles, if co-working with Iso view - perfect tool for 4 cutting
i'd wish this script in main moi!

there's a glitch .. while i was testing it so often, setting up upDownAngle, leftRightAngle, tiltAngle i still can see 1 extra frame of script execution... here Michael if will have time could help

Attachments:
_viewSideSnap.js


From: Michael Gibson
9 Dec 2017   [#24] In reply to [#23]
Hi Cemortan, I think there's a bug somewhere in setting tilt angles where you may need to set it twice in a row to get it to the full position, you might try setting it twice in your script and see if that helps for now.

- Michael
From: Cemortan_Tudor
17 Dec 2017   [#25] In reply to [#24]
nope, didn't work
as much i don't feel that my computer is slow & it's not handling operations ! as far as i notice JS is doing on the fly, can't control timer or delay of execution.
not too important afterwall

Show messages:  1-5  6-25  26-45  46-65  66-85  …  366-372