View Full Version : Points to Nulls

01-28-2009, 09:30 AM
I'm searching a plugin that converts points of a mesh and 1 point polys (points) into nulls in layout.
The search function of the forum doesn't work, for me, and flay gives me a dead link. The plugin should be Null_it or something.

01-28-2009, 09:35 AM
You could always emit particles to the points then clone a null to them. If option plugin fails :)

01-28-2009, 09:40 AM
Yeah, but I need those nulls to be at certain distance one from another, with the emitter and Fxlinker I can't do this, or at least, I'm not aware.
In modeler a do a merge at 500mm, in lyout convert in nulls and the job is done. I need that plugin! Please!! :)

01-28-2009, 09:57 AM
Had nothing to do so created a simple thing. Hope it's what you're after :D
It will create a null on each point in the object.

@script generic
@name points2nulls

(myObject) = Scene().getSelect();
pntCnt = myObject.pointCount();
polCnt = myObject.polygonCount();
nullnumber = 1;
pos = myObject.getWorldPosition(0);
for(i = 1; i <= polCnt; i++)
polyId = myObject.polygons[i];
thisPolysPntCount = myObject.vertexCount(polyId);

for(pnt = 1; pnt <= thisPolysPntCount; pnt++)
pointId = myObject.vertex(polyId,pnt);

meshPoints += pointId;
AddNull(myObject.name+" Null "+nullnumber);
AddPosition(myObject.position(pointId).x + pos.x,myObject.position(pointId).y + pos.y,myObject.position(pointId).z + pos.z);
nullnumber += 1;

01-28-2009, 10:09 AM
Wow, super! You are my hero!
Walfridson for president!

01-28-2009, 10:20 AM
here both from my L script folder..

04-08-2010, 01:41 AM
I can't get either of the points2nulls scripts working. Not the one with the code above or the one in the ZIP. I run them on a simple rectangle in Layout and they each give me four (or more) nulls bunched together. No where near the vertices they represent.

I tried changing the coordinate space too. No luck. What am I doing wrong?

04-08-2010, 03:05 AM
attach the object.

04-08-2010, 09:10 AM
Sorry, but what does "attach the object" mean? Is that like a way to run the LScript or something?

04-08-2010, 09:16 AM
Sorry, I meant attach the object + scene in your post here.

04-08-2010, 10:43 AM
Isnt this a perfect use of Powergons?

04-08-2010, 10:53 AM
Here is a sample file. Load it into Layout and Use the Cvt Powergons command (Convert Powergons)

3 Nulls will be generated based on the 3 points that make up the object.

This is teh Powergon command that is added in Modeler:
AddNull "Null"\rAddPosition \c\rCreateKey 0

Its the most basic use of Powergons .... hope it helps.

note: You could give each point a unique "Null" name so that you have good naming conventions when the Nulls are created in Layout.

04-08-2010, 10:11 PM
Thanks for the reply William. I hadn't thought of Powergons. I tried your idea, after consulting your Powergon Tutorial video. However, your code places each Null in the polygon's center on the model. Is there a command to place a Null on each vertex? It seems I'd have to make a version of my model with a bunch of 1-point polygons as vertices to make this work. For the record, I'm not even sure how to do that. The "Kill" command just leaves vertices, which don't work with Powergons.

Also, I got the LScript working from the ZIP file. For some reason it wasn't working in my scene yesterday. I made some simple objects and tested it and it's working. I was doing Cageman's Boat Rig tutorial for the HOT Ocean for Lightwave plugin and it calls for a script that does this. In Layout I had a large boat model in there, but it was hidden and on a different layer. Maybe that had something to do with it not working.

04-08-2010, 10:24 PM
Actually the script still doesn't work right when I try to run it on a simple rectangle that has another layer in the model that is a complex object. I've attached the object and scene. When I run the script on the rectangle, I get results similar to my image above.

The only way I can get it work work is to put the rectangle and the boat in completely separate objects. :hammer:

04-09-2010, 05:24 AM
Select all your points and use the points2polys option

04-09-2010, 02:47 PM

I think all links etc to the third party scripts and tools I used in the videotutorial are included!


08-11-2015, 09:03 PM
nice thread

09-08-2015, 07:21 AM
Ohh..this is old stuff, but recently had the need for using points to nulls, I havenīt checked the scripts posted here, cagemans thread link donīt work anymore by the way...might need to check his ftp etc.

But..going with the suggestions from William Vaughan, powergons works, I was just testing placing nulls where I have made cutīs in a 2d artwork box, so I did place the points with cuts by selecting edges and using connect to divide it in the middle of the edges, then copy those points to a background layer, now we of course need powergons to recognize points as polygons, so just as william mentioned, select the points and convert to 1 point polygons in the create tab/polygons more/make 1 point polygons, then
go to the setup tab and add/edit powergons....clear the textstring command and enter this....

AddNull NULL_name\rPosition \c\rRotation \n

That will make a powergon on each of those 1 point polygons, so once saved and sent to layout, it can be converted to nulls in one go.