All pastes #242533 Raw Edit

jesterKing

public text v1 · immutable
·published 2006-11-07 11:14 UTC
rendered paste body
static void test_obpoin_but(char *name, ID **idpp)
{
	ID *id;
	
	for(id= G.main->object.first; id; id= id->next) {
		if( strcmp(name, id->name+2)==0 ) {
			if(id == (ID *)OBACT) {
				error ("Cannot center on own Object");
				break;
			}
			
			*idpp= id;
			return;
		}
	}
	*idpp= NULL;
}