Page 1 of 3 123 LastLast
Results 1 to 15 of 31

Thread: point and poly info inlayout

  1. #1

    point and poly info inlayout

    hello all is there a way to get infomation about each point and polygon in layout

    i am working on a custom exporter and need this info to output in my file

    i have read the docs and there doesnt seem to be a real clear answer to this question

    it looks like the only way to get that info is in modler but i need to export animation data as well

    any suggestions

  2. #2

    Re: point and poly info inlayout

    Originally posted by fortress
    hello all is there a way to get infomation about each point and polygon in layout

    i am working on a custom exporter and need this info to output in my file

    i have read the docs and there doesnt seem to be a real clear answer to this question

    it looks like the only way to get that info is in modler but i need to export animation data as well

    any suggestions
    point and polygon info can be accessed using the Mesh Object Agent. you need to cycle through all the meshes in your scene. quite easy:

    Code:
    m = Mesh();
    while(m)
    {
    ...
    m = m.next();
    // process mesh
    }
    look at the points and polygons object agent in the docs to find out more about the specific type of point / poly info you can access.
    "The hardness of God is kinder than the softness of men, and His compulsion is our liberation." - C.S. Lewis


  3. #3
    thank you for the reply
    i have gotten the mesh object setup and can get the data mebers in it

    i just wasnt sure on how to setup the point and poly objects
    when i tried setting them up the same as the mesh objects i get errors

    just wanted to double check to make sure it can be done

    now i know it is just me
    hehe

  4. #4
    Well, there is a tool plug-in (not sure if it's a script) called xTool that will let you animate individual points in Layout so it can be done.

  5. #5
    hmm ill have to look into that

    maybe i am just confussed about how it is done
    according to the docs you have to put your script into mesh edit mode but then they say that you can only enter mesh edit mode in modeler

    unless i have to set the script up as a different type or something not sure

    what i need to get is all the points locations and uv data as well as all the poly locations and weightmap data

    i am trying to make a custom model and animation exporter

  6. #6
    Originally posted by fortress
    hmm ill have to look into that

    maybe i am just confussed about how it is done
    according to the docs you have to put your script into mesh edit mode but then they say that you can only enter mesh edit mode in modeler

    unless i have to set the script up as a different type or something not sure

    what i need to get is all the points locations and uv data as well as all the poly locations and weightmap data

    i am trying to make a custom model and animation exporter
    dont have much time to sift through this code i did for BoneLatticeGN but this is how i go through points. btw: in this code i go through a mesh's points and look for their endomorphs.

    Code:
    	for(i=1;i<=pointList.size();i++)
    	{
    		if(i > selected.pointCount(1))
    			break;
    		j = pointList[i];
    		vmap = VMap(VMWEIGHT);
    		mmap = VMap(VMMORPH);
    
    		sp = selected.points[j];
    		vec[i] = selected.position(sp);
    
    		names[i] = nil;
    		values[i] = nil;
    
    		while(vmap && vmap.type == VMWEIGHT)
    		{
    			if(vmap.isMapped(sp))
    			{
    				names[i] = vmap.name;
    				values[i] = vmap.getValue(sp,1);
    				break;
    			}
    			vmap = vmap.next();
    		}
    		j = 1;
    		while(mmap && mmap.type == VMMORPH)
    		{
    			if(mmap.isMapped(sp))
    			{
    				mmap.getValue(sp);
    				evtemp = <this[1],this[2],this[3]>;
    				endoVal[i,j] = evtemp;
    			}
    			mmap = mmap.next();
    			j++;
    		}
    	}
    btw: the array pointList[] contains integers corresponding to the element it is on.

    pointList[1] = 1;
    pointList[2] = 2;
    pointList[3] = 3;

    etc...
    "The hardness of God is kinder than the softness of men, and His compulsion is our liberation." - C.S. Lewis


  7. #7
    Valiant NewTeKnight Matt's Avatar
    Join Date
    Feb 2003
    Location
    San Antonio, Texas, USA
    Posts
    13,054
    I really wish you'd comment your code so dummos like me can learn from the master!

    Not so much the syntax, that's easy to read but what the code is doing and why!

    UI / UX Designer @ NewTek
    __________________________________________________
    www.pixsim.co.uk : LightWave Video Tutorials & Tools


  8. #8
    thank you very much that will help a lot
    as far as the script running in layout

    did you right it as a generic script or a displacment or something else

    i think that might be where i am having problem so far i have only tried a generic script

  9. #9
    ohh wait

    BoneLatticeGN GN = generic script nm

  10. #10
    nice website btw

  11. #11
    had a question for you faulknermano
    as far as accessing the pointlist array is that setup automaticlly or did you create the array

    and if it is an automatic data you can get to
    is it an object like a mesh object or a data meber of something

  12. #12
    ok maybe im just stupid or something

    but i cant find anywhere in the ref docs anything about the pointList[] array

    there is a point[] array but cant access that in layout only in modeler

    accroding to the docs and i have tried a few things and cant seem to get and info on points or polys in layout other then teh total count
    Last edited by fortress; 11-26-2003 at 06:33 PM.

  13. #13
    Originally posted by fortress
    ok maybe im just stupid or something

    but i cant find anywhere in the ref docs anything about the pointList[] array

    there is a point[] array but cant access that in layout only in modeler

    accroding to the docs and i have tried a few things and cant seem to get and info on points or polys in layout other then teh total count

    sorry for keeping you wait: the pointList is created manually, using a loop.

    actually, i use the pointList[] array because of the innerworkings of the original script. the idea is the feed an index number to the points array _data member_.

    if you could try to post your working code snippet i might be able to spot what's going on.
    "The hardness of God is kinder than the softness of men, and His compulsion is our liberation." - C.S. Lewis


  14. #14
    Originally posted by Matt
    I really wish you'd comment your code so dummos like me can learn from the master!

    Not so much the syntax, that's easy to read but what the code is doing and why!

    i was in deep meditation when i was writing it. writing comments sometimes just slows down the thought processes. of course, it's just as hard on me as it is to you on what it all means after a few months.
    "The hardness of God is kinder than the softness of men, and His compulsion is our liberation." - C.S. Lewis


  15. #15
    oki figured out that the pointList array was made by you
    but as far as geting to the Points array data member how is that done in layout

    i thought you could only get to that from modler scipt inbwteen the editBegin and editEnd calls

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •