MoI discussion forum
MoI discussion forum

Full Version: Nimble Nudge (Script)

Show messages: All  1-11  12-14

From: Cody (ECHOLOCATING)
15 Mar 2023   [#12] In reply to [#11]
What you've suggested does get rid of the "locked" script problem. I looked in the old MoI API reference HTML page and "Waitable Objects" were probably my problem, if I'm not mistaken.

However, getSelectedObjects() does not seem to include the edit points of objects. Before, I could tweak the curve point of a line with the nudge script. This is pretty critical for my workflow.

Is there a way to get objects and potential editable points? ...or maybe there is a clever way to cancel the "waitable" thing before running "return;" and keep the current object selection code? ...can I issue an "Esc key press" or the code behind it before running "return;"? ...what are your thoughts?

-- Cody
From: Michael Gibson
15 Mar 2023   [#13] In reply to [#12]
Hi Cody, how about like this:

code:
	var objectpicker = moi.ui.createObjectPicker();
	objectpicker.allowEditPoints();
	objectpicker.done();
	var objects = objectpicker.objects;

	if ( objects.length == 0 )
		return;


- Michael
From: Cody (ECHOLOCATING)
15 Mar 2023   [#14] In reply to [#13]
That worked beautifully!

You tried to let me figure it out on my own. I respect that. ;-)

>> objectpicker.done(); <<

To my defence, I tried objectpicker.cancel(); before my last post, but my monkey brain just couldn't connect the dots.

I'll update the script now in the first post.

Michael, you are amazing. I don't think any business holds a candle to the customer service you offer. Just don't burn yourself out, man!

-- Cody

Show messages: All  1-11  12-14