static private void GetSolidFillColor() { Photoshop.ActionReference reference = new Photoshop.ActionReference(); reference.PutEnumerated(PhotoshopApplication.StringIDToTypeID("contentLayer"), PhotoshopApplication.CharIDToTypeID("Ordn"), PhotoshopApplication.CharIDToTypeID("Trgt")); Photoshop.ActionDescriptor descriptor = PhotoshopApplication.ExecuteActionGet(reference); Photoshop.ActionList actionList = descriptor.GetList(PhotoshopApplication.CharIDToTypeID("Adjs")); Photoshop.ActionDescriptor solidColorLayer = actionList.GetObjectValue(0); Photoshop.ActionDescriptor color = solidColorLayer.GetObjectValue(PhotoshopApplication.CharIDToTypeID("Clr ")); double red = color.GetDouble(PhotoshopApplication.CharIDToTypeID("Rd ")); double green = color.GetDouble(PhotoshopApplication.CharIDToTypeID("Grn ")); double blue = color.GetDouble(PhotoshopApplication.CharIDToTypeID("Bl ")); }
/// <summary> /// Hides all layers. /// </summary> private void hideAllLayers() { Photoshop.ActionReference __ref = new Photoshop.ActionReference(); __ref.PutEnumerated(__appRef.CharIDToTypeID("Lyr "), __appRef.CharIDToTypeID("Ordn"), __appRef.CharIDToTypeID("Trgt")); Photoshop.ActionList __list = new Photoshop.ActionList(); __list.PutReference(__ref); Photoshop.ActionDescriptor __desc = new Photoshop.ActionDescriptor(); __desc.PutList(__appRef.CharIDToTypeID("null"), __list); __appRef.ExecuteAction(__appRef.CharIDToTypeID("Hd "), __desc, Photoshop.PsDialogModes.psDisplayNoDialogs); }