示例#1
0
void Matte::EnableStuff() {
   if (pblock) {
      IParamMap2 *map = pblock->GetMap();
      if (map) {
         map->Enable(matte_reflection_amount, reflmap?TRUE:FALSE);
         map->Enable(matte_affect_alpha, opaque?FALSE:TRUE);
         }
      }
   }
示例#2
0
	void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t)
	{
		if (id == kConeAngleUseSquare)
		{
			IParamMap2* pmap = ((IParamBlock2*)((ConeAngleManipulator*)owner)->GetReference(PBLOCK_REF_NO))->GetMap();
			if (pmap) pmap->Enable(kConeAngleAspect, v.i);
		}
			
	}
示例#3
0
   void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t)    // set from v
   {
      Matte* p = (Matte*)owner;
      if (p!=NULL) {
         IParamMap2 *map = p->pblock->GetMap();
         if (map) {
            switch (id) {
               case matte_opaque_alpha:
                  map->Enable(matte_affect_alpha, v.i? FALSE: TRUE);
                  break;
               case matte_reflection_map:
                     map->Enable(matte_reflection_amount, v.r?TRUE: FALSE);
                  break;
               }
            }
         }

   }
示例#4
0
void Gradient::EnableStuff() {
	if (pblock) {
		IParamMap2 *map = pblock->GetMap();
		pblock->GetValue( grad_noise_type, 0, noiseType, FOREVER );
		if (map) {
			map->Enable(grad_levels, noiseType==NOISE_REGULAR?FALSE:TRUE);
			}
		}
	}
示例#5
0
void BerconWood::EnableStuff() {
	if (pblock) {
		IParamMap2 *map = pblock->GetMap();
		if (map) {
			// Update values we need to know
			pblock->GetValue( use_distortion, 0, useDistortion, FOREVER);
			pblock->GetValue( lock_grain, 0, lockGrain, FOREVER);		

			// Update parameters			
			map->Enable(noise_color3, lockGrain?FALSE:TRUE);
			map->Enable(noise_map3, lockGrain?FALSE:TRUE);
			map->Enable(noise_map3_on, lockGrain?FALSE:TRUE);

			map->Enable(distortion_str, useDistortion);
			map->Enable(distortion_map, useDistortion);
			map->Enable(distortion_map2, useDistortion);
		}
	}
}
示例#6
0
void BerconNoise::EnableStuff() {	
	if (pblock) {
		IParamMap2 *map = pblock->GetMap();		
		if (map) {
			// Update values we need to know
			pblock->GetValue( use_distortion, 0, useDistortion, FOREVER);
			pblock->GetValue( noise_function_type, 0, noiseFunction, FOREVER);
			pblock->GetValue( fractal_type, 0, fractalFunction, FOREVER);

			// Update parameters			
			map->Enable(noise_phase, noiseFunction==2||noiseFunction==5?TRUE:FALSE);
			
			map->Enable(worley_F1, noiseFunction==6?TRUE:FALSE);
			map->Enable(worley_F2, noiseFunction==6?TRUE:FALSE);
			map->Enable(worley_F3, noiseFunction==6?TRUE:FALSE);
			map->Enable(worley_F4, noiseFunction==6?TRUE:FALSE);
			map->Enable(worley_distance, noiseFunction==6?TRUE:FALSE);
			map->Enable(worley_spread, noiseFunction==6?TRUE:FALSE);			

			map->Enable(fractal_levels, fractalFunction!=0?TRUE:FALSE);			
			map->Enable(fractal_lacunarity, fractalFunction>2?TRUE:FALSE);			
			map->Enable(fractal_h, fractalFunction>2?TRUE:FALSE);			
			map->Enable(fractal_offset, fractalFunction>4?TRUE:FALSE);			
			map->Enable(fractal_gain, fractalFunction>5?TRUE:FALSE);

			map->Enable(distortion_str, useDistortion);
			map->Enable(distortion_map, useDistortion);
			map->Enable(distortion_map2, useDistortion);
		}
	}
}
示例#7
0
void BerconTile::EnableStuff(TimeValue t) {
	if (pblock) {
		IParamMap2 *map = pblock->GetMap();
		if (map) {
			// Update values we need to know
			
			//pblock->GetValue( tile_style, 0, tilingType, FOREVER);
			pblock->GetValue( use_distortion, 0, useDistortion, FOREVER);

			// Update parameters			
			map->Enable(soften_rad, tileParam.tileBlur!=0?TRUE:FALSE);
			map->Enable(round_rad, tileParam.tileRound);

			map->Enable(tile_height, tileParam.tilingType != 1);
			map->Enable(tile_width2, tileParam.tilingType != 1);
			map->Enable(tile_height2, tileParam.tilingType != 1);

			map->Enable(pb_uv_channel, tileParam.mapUV);
			map->Enable(pb_auto, tileParam.mapUV);
			map->Enable(pb_rotUV, tileParam.mapUV);
			map->Enable(pb_uv_channel, tileParam.mapUV);
			map->Enable(pb_randX, tileParam.mapUV);
			map->Enable(pb_randY, tileParam.mapUV);
			map->Enable(pb_randSX, tileParam.mapUV);			
			map->Enable(pb_randSY, tileParam.mapUV && (!tileParam.lock));			
			map->Enable(pb_lock, tileParam.mapUV);
			map->Enable(pb_flipX, tileParam.mapUV);
			map->Enable(pb_flipY, tileParam.mapUV);
			map->Enable(pb_randRot, tileParam.mapUV && (tileParam.rotUV==3));	
			map->Enable(pb_center_channel, tileParam.center);

			map->Enable(noise_color3, lockEdge?FALSE:TRUE);
			map->Enable(noise_map3, lockEdge?FALSE:TRUE);
			map->Enable(noise_map3_on, lockEdge?FALSE:TRUE);

			map->Enable(distortion_str, useDistortion);
			map->Enable(distortion_map, useDistortion);
			map->Enable(distortion_map2, useDistortion);

			int type = berconXYZ.isRealworld();

			setSpinnerType(map, t, tile_width,  IDC_TILEWIDTH_EDIT,  IDC_TILEWIDTH_SPIN,  type);	
			setSpinnerType(map, t, tile_height, IDC_TILEHEIGHT_EDIT, IDC_TILEHEIGHT_SPIN, type);
			setSpinnerType(map, t, edge_width,  IDC_EDGEWIDTH_EDIT,  IDC_EDGEWIDTH_SPIN,  type);
			setSpinnerType(map, t, edge_height, IDC_EDGEHEIGHT_EDIT, IDC_EDGEHEIGHT_SPIN, type);

			setSpinnerType(map, t, soften_rad, IDC_SOFTENRAD_EDIT, IDC_SOFTENRAD_SPIN, type);
			setSpinnerType(map, t, round_rad,  IDC_CORNER_EDIT,    IDC_CORNER_SPIN,    type);
		}
	}
}
示例#8
0
void BerconGradient::EnableStuff() {			
	if (!pblock) return;
	IParamMap2 *map = pblock->GetMap();
	if (map) {
		// Update values
		TimeValue t = GetCOREInterface()->GetTime();
		pblockGetValue(pb_type, p_type);
		pblockGetValue(pb_dison, p_disOn);
		pblockGetValue(pb_gradient_normal,	p_normalType);
		pblockGetValue(pb_gradient_normal2,	p_normalFunction);
		// Key params
		map->Enable(pb_keyTex,		gradient->selected==-1?FALSE:TRUE);
		map->Enable(pb_keyPos,		gradient->selected==-1?FALSE:TRUE);
		map->Enable(pb_keyCol,		gradient->selected==-1?FALSE:TRUE);
		// Random
		map->Enable(pb_seed,		p_type==5?TRUE:FALSE);
		map->Enable(pb_rand_obj,	p_type==5?TRUE:FALSE);
		map->Enable(pb_rand_mat,	p_type==5?TRUE:FALSE);
		map->Enable(pb_rand_par,	p_type==5?TRUE:FALSE);
		map->Enable(pb_rand_tile,	p_type==5?TRUE:FALSE);
		// Mapped
		map->Enable(pb_maptex,		p_type==4?TRUE:FALSE);		
		// Distortion
		map->Enable(pb_disstr,		p_disOn?TRUE:FALSE);
		map->Enable(pb_distex,		p_disOn?TRUE:FALSE);
		// Normal / Distance
		map->Enable(pb_gradient_normal,		p_type==1||p_type==2?TRUE:FALSE);
		map->Enable(pb_gradient_normal2,	p_type==1?TRUE:FALSE);
		map->Enable(pb_ior,					p_type==1&&p_normalFunction==2?TRUE:FALSE);
		map->Enable(pb_node,				(p_type==1||p_type==2)&&(p_normalType==10||p_normalType==11)?TRUE:FALSE);
		// UVW
		map->Enable(pb_gradient_uvw,	p_type==0?TRUE:FALSE);
	}		
}