PDA

View Full Version : Free Scripts: Assign Tools Pack



Matt
03-31-2013, 03:47 PM
Hi all

I created some scripts that work essentially like my Coord Tools Pack in Modeler, but in Layout - for fast (and multi-select aware) assigning of targets, parents, goals, poles, position / rotation / scale items.


113190


Here is a video to explain how these work:

Assign_Tools_Pack_v1.0_Video_Tutorial.zip (http://www.pixsim.co.uk/LW_Scripts/Assign_Tools_Pack_v1.0_Video_Tutorial.zip)

The scripts (including menu branch) can be downloaded here:

113189

Hope you find them useful.

Cheers
Matt

nickdigital
03-31-2013, 03:56 PM
These look great! Thanks!

Dodgy
03-31-2013, 06:02 PM
Thanks Matt, navigating the selection dropdowns is always a slowdown.

probiner
03-31-2013, 06:55 PM
Quite useful, thanks for the chocolate egg :D What dodgy said. In SI for example you click on objects to set parent and child relations (depending on the click combinations)
Also nice touch with menu branches.

Cheers

BokadCastle
04-26-2013, 09:12 PM
I'm getting some odd results when targeting the lights to the null as per the video.
My light icons wouldn't face the null.
To test, I parented a box to the null.
The box is illuminated as the light icons are facing, not as targeted.

BokadCastle
04-27-2013, 04:28 PM
a minor point -
the info boxes for 'No item stored' and 'Stored item no longer exists' are only correct for 'Target' item.
This applies to 'Goal', 'Parent' etc.

I realise this is a freebie and I quite appreciate its purpose. Thanks.

xchrisx
04-27-2013, 04:48 PM
version 2.2 refers to the version of lscript he is using. the 1.0 is the version of the script.

BokadCastle
04-27-2013, 05:37 PM
the same for targeting cameras

BokadCastle
04-27-2013, 05:41 PM
version 2.2 refers to the version of lscript he is using. the 1.0 is the version of the script.

thanks...I keep learning :thumbsup:

BokadCastle
04-28-2013, 08:41 PM
I opened the 'Command History' to see what was happening.

I'm not a programmer, my knowledge of Lscript = 0

With just the Assign script there are no values for the Heading or Pitch controllers.
In the native LW motion options panel, I manually set the the Target Item.

I noticed there are now values set for the controllers - value of 1.
In the drop down lists 'Point at Target' is second on the list.
I assume first on the list has a value of zero.

Do I now set those values in the scripts somehow...anyone?

BokadCastle
04-30-2013, 05:40 AM
Well you do this - you add
HController(2);
PController(2);
to Matt's script under TargetItem(storedItemName);

curious that the values of HController and PController needed to be 2, and returned 1 in the Command History.
I'll sort it all tomorrow, it's late.

so the body of the script becomes -

generic
{
var selectedItems = Scene().getSelect();

numberOfItems = selectedItems.size();

if(numberOfItems == 0)
{
info("No Items Selected");
return;
}

storedItemName = globalrecall("storedSelected", NULL);

if(storedItemName == nil)
{
info("No item stored. Use 'Store Selected' script to choose a target item");
return;
}

if(!getfirstitem(storedItemName))
{
info("Stored item name no longer exists in the scene. Use 'Store Selected' script to choose a target item");
return;
}

TargetItem(storedItemName);

HController(2);
PController(2);
}

Ryan Roye
04-30-2013, 07:05 AM
I just got to try this out, quite handy!

I especially like that you added assign/clear parent. I plugged the functions I think I'll be using the most into my shift/click menus; parenting/unparenting is something I do frequently and I'm happy to replace my tacky workarounds with this script :)

raw-m
04-30-2013, 07:23 AM
Very handy, thanks Matt.

Any chance you can add a "sticky" standalone thread with just your updates and scripts in one place? Would hate to miss these and your Light pack etc...

Matt
04-30-2013, 10:30 AM
I could make the script auto set the align to path setting on the heading and pitch if people prefer that, I just didn't want to assume.

Lewis
04-30-2013, 12:01 PM
Can you make it that Lights target the null as it should be when it's targeted? From your video it seemd like they just draw dotted lines to it but lights direction stayed untouched i.e. rotated away from null which doesn't seem like logically in my head when targeting spotlights/distant lights?

thanks for scripts :).

BokadCastle
04-30-2013, 02:44 PM
Can you make it that Lights target the null as it should be when it's targeted? From your video it seemd like they just draw dotted lines to it but lights direction stayed untouched i.e. rotated away from null which doesn't seem like logically in my head when targeting spotlights/distant lights?

thanks for scripts :).

um?..huh??...refer to my above posts #10 and #11.

BokadCastle
05-03-2013, 01:45 PM
Just a thought...I was wondering if seven separate 'Assign' scripts could be condensed to just one.
In that case - 'Store Selected' - would remain as is, but the second selection would be to a variable which would determine what part of the script to run, depending on the selection.

This would make editing more controllable in the case of a change or mistake, only one instead seven corrections to be made.
Same for 'Clear'.

Ryan Roye
05-03-2013, 01:51 PM
This would make editing more controllable in the case of a change or mistake, only one instead seven corrections to be made.
Same for 'Clear'.

I find it more handy to have them split myself. This way, I can take the parts of the coord tools pack that I use most frequently for hotkeys/mouse menus, and leave the functions that don't get used as often in in its own tab. I don't know if it'd be that easy to customize the control scheme if it were all consolidated.

by the way, I also agree that target should automatically set the object to "point at target"; its a common thing to do in Lightwave for animation.

Matt
05-09-2013, 12:40 PM
Hi all

Small update based on requests.


Added 'Point at Target' for Heading and Pitch when using (and clearing) Target assignments
Added UI version for assigning / clearing en-mass
Updated menu branch


114219

114217

Matt
05-09-2013, 01:05 PM
If you downloaded v1.1 before you saw this post, grab it again, I found a small error. Fixed now.

mikadit
05-13-2013, 11:40 AM
thank you!

allabulle
05-13-2013, 01:07 PM
Yup, thank you again, Matt.

Matt
08-30-2013, 04:12 AM
v1.2 Update:


Made scripts use item IDs not item names (finally solved why IDs weren't working when I tried to use these like I wanted from the start!)
Made Position/Rotation/Scale items set the 'Same As Item' and 'World' flags
Fixed spelling error on some script names (remove the old ones and add these, then import the new menu branch)
Updated menu branch


116705

Ryan Roye
08-30-2013, 06:32 AM
Thanks Matt! A good update to an incredible plugin that every single Lightwaver in existence needs to have.

P.S. ... Your spelling teacher forgives you.

JohnMarchant
08-31-2013, 04:03 AM
Thanks for the update Matt

allabulle
08-31-2013, 08:05 AM
Thanks.

Matt
10-06-2013, 11:46 PM
Just added support for the Spline Control item in LightWave 11.6.

Grab the update from here: www.pixsim.co.uk (http://www.pixsim.co.uk/#assign_tools)

Any problems let me know.

Cheers
Matt

Lewis
10-07-2013, 12:51 AM
Thanks for update Matt

allabulle
10-07-2013, 07:18 AM
Thanks again, Matt.

VermilionCat
11-27-2013, 10:04 PM
Hi, Matt.
Some of those don't seem to work properly (clearing world checkbox, position controller, etc.). Could you check that please?