Ejemplo n.º 1
0
// SCWP_PolyScan_Select():
EDError SCWP_PolyScan_Select( void *_op, const EDPolygonInfo *poly ) {
  MeshEditOp *op = (MeshEditOp *)_op;

  if( !(poly->flags & EDDF_SELECT) ) {
    for( unsigned long i=0; i < parts.NumElements(); i++ ) {
      const char *part = op->polyTag( op->state, poly->pol, LWPTAG_PART );
      if( part != NULL ) {
        if( strcmp( parts[i], part ) == 0 )
          return (*op->polSelect)( op->state, poly->pol, 1 );
      }
    }
  }

  return EDERR_NONE;
}
Ejemplo n.º 2
0
// SCWP_PolyScan_FindParts():
EDError SCWP_PolyScan_FindParts( void *_op, const EDPolygonInfo *poly ) {
  MeshEditOp *op = (MeshEditOp *)_op;

  if( poly->flags & EDDF_SELECT ) {
    const char *part = op->polyTag( op->state, poly->pol, LWPTAG_PART );
    if( part != NULL ) {
      unsigned long i;
      for( i=0; i < parts.NumElements(); i++ ) {
        if( strcmp( parts[i], part ) == 0 )
          break;
      }

      if( i == parts.NumElements() )
        parts.Add( StringTools::strdup( part ) );
    }
  }

  return EDERR_NONE;
}