PDA

View Full Version : How I make in order to create a Null object?



atomik35
04-02-2007, 04:52 AM
Hello.
Ok, after to have before created my plgin "hello world" in layout, it is time mean it.
How I make in order to create a Null object?
How change its position?
I using vc++ and lw 9.0
Please help me.

Thank you

Sensei
04-02-2007, 12:30 PM
You need to issue Layout commands..
Read this doc:
http://www.newtek.com/lightwave/developer/LW80/8lwsdk/docs/commands.html

atomik35
04-03-2007, 01:24 AM
Ok, tahnk you.
I have not found no example.
Only commands

Sensei
04-03-2007, 02:19 AM
To create null, you need to use command "AddNull".. To move object you have to select it and use "Position" or "AddPosition".. There is no other way than using commands..

atomik35
04-03-2007, 02:45 AM
Ok.
Very thank you for your help and your patience for my question.
But it is possible to have an example anyfile.c.
Please help me.

avogad
04-03-2007, 04:10 AM
Here is the code to create a null.


#include <lwserver.h>
#include <lwgeneric.h>
#include <lwhost.h>
#include <stdio.h>

XCALL_( int )
AddNull( long version, GlobalFunc *global, LWLayoutGeneric *local,
void *serverData )
{
if ( version != LWLAYOUTGENERIC_VERSION )
return AFUNC_BADVERSION;

local->evaluate( local->data, "AddNull my_null" );

return AFUNC_OK;
}

ServerRecord ServerDesc[] = {
{ LWLAYOUTGENERIC_CLASS, "AddNull", AddNull },
{ NULL }
};


Take care.