// SCWP_Activate XCALL_ (int) SCWP_Activate( long version, GlobalFunc *global, void *local, void *serverData ) { if ( version != LWMODCOMMAND_VERSION ) return AFUNC_BADVERSION; LWModCommand * command = (LWModCommand *)local; if( command == NULL ) return AFUNC_BADLOCAL; // Build a list of parts for the selected polygons MeshEditOp *op = (command->editBegin)( 0, 0, OPSEL_DIRECT | OPSEL_MODIFY ); parts.Flush(); EDError err = op->polyScan( op->state, SCWP_PolyScan_FindParts, (void *)op, OPLYR_FG ); if( err != EDERR_NONE ) { op->done( op->state, err, 0 ); } else { // Select polygons belonging to the selected parts err = op->polyScan( op->state, SCWP_PolyScan_Select, (void *)op, OPLYR_FG ); op->done( op->state, err, 0 ); } // Clean up parts.Flush(); return CSERR_NONE; }
meZFacing( long version, GlobalFunc *global, MeshEditBegin *local, void *serverData ) { MeshEditOp *edit; EDError err = EDERR_NONE; edit = local( 0, 0, OPSEL_DIRECT | OPSEL_MODIFY ); if ( !edit ) return AFUNC_BADLOCAL; err = edit->polyScan( edit->state, polscan, edit, OPLYR_PRIMARY ); edit->done( edit->state, err, 0 ); return AFUNC_OK; }
csZFacing( long version, GlobalFunc *global, LWModCommand *local, void *serverData ) { MeshEditOp *edit; EDError err = EDERR_NONE; /* ... some commands ... */ edit = local->editBegin( 0, 0, OPSEL_DIRECT | OPSEL_MODIFY ); if ( !edit ) return AFUNC_BADLOCAL; err = edit->polyScan( edit->state, polscan, edit, OPLYR_PRIMARY ); edit->done( edit->state, err, 0 ); /* ... some more commands ... */ return AFUNC_OK; }