extendscript after effects colorize not working or how do i add it - extendscript

am trying to add the effect Colorize Blue wash or Colorize -blue wash to my seleced layer it does not work.
when manually selected it adds color balance and color balance hld with modified setting .
now how do i use my code
var myComp = app.project.activeItem;
var preCompLayer = myComp.selectedLayers[0];
preCompLayer.property("Effects").addProperty("Colorize - blue wash");
image below snapshot

You are attempting to apply a preset as though are you applying an effect. First you'll need to find the path to the preset file in your After Effects installation. You can apply the preset like so:
var myComp = app.project.activeItem;
var preCompLayer = myComp.selectedLayers[0];
// Path to your preset file below
var presetFile = File("/your-After-Effects-path/Presets/Image - Creative/Colorize - blue wash.ffx");
preCompLayer.applyPreset(presetFile);

Related

How do I carry over identical texture mapping when exporting to DAE?

I am able to open a 3DS file in MeshLab and when I export to Collada DAE format the textures are visible but they are not being projected onto the mesh in the same way as the preview in MeshLab. For example, the front/back faces of a cube would have the proper texture (suppose it's a polka dot) but the top and bottom have a striped look. How can I apply a single texture and have it appear as intended on all faces, like the imported model before I convert it?
This problem is a result of the end software being used to view the DAE file. It's not a problem with MeshLab.
For example, if loading the file into Away3D be sure to handle the texture materials using the TextureMaterial class instead of the simpler SinglePassMaterialBase such as what you might find in their example code. Here is what I use now, and it displays texture properly:
var material:TextureMaterial = cast(asset, TextureMaterial);
material.ambientColor = 0xffffff;
material.lightPicker = _lightPicker;
material.shadowMethod = new FilteredShadowMapMethod(_light);
material.lightPicker = _lightPicker;
material.gloss = 30;
material.specular = 1;
material.ambient = 1;
material.repeat = true;

How to add text below/above in the middle of the polyline in osmdroid

How to add text below/above in the middle of the polyline in osmdroid? setTitle() does not work neither is setSubDescription().
And also how to add button overlays.
There is a way to do it and it's an opt in feature of the Marker class. The easiest way to find an example is with the LatLonGridOverlay. I'll reduce the logic to something simple to understand below. The key is the order of code, see the title, then set the icon to null, then add to the map. You'll have to figure out where you want the Marker to be based on the coordinates of the polyline but it does work.
Polyline p = new Polyline();
List<GeoPoint> pts = new ArrayList<GeoPoint>();
//add your points here
p.setPoints(pts);
//add to map
Marker m = new Marker(mapView);
m.setTitle("Some text here");
//must set the icon last
m.setIcon(null);
m.setPosition(new GeoPoint(marker location here));
//add to map
source
Setting icon to null alone doesn't worked for me, I need to use setTextIcon:
distanceMarker = new Marker(mapView);
distanceMarker.setIcon(null);
distanceMarker.setTextIcon(distance);
GeoPoint p3 = new GeoPoint((loc.getLatitude()+poi.getLat())/2,(loc.getLongitude()+poi.getLon())/2);
distanceMarker.setPosition(p3);
mapView.getOverlayManager().add(distanceMarker);

Load a new IMG as pattern into a SVG

Into my page I have a SVG image wth 3 path then on other side I have 3 buttons. On click on each button I want apply a pattern to my SVG's path.
The script I did not works completly. It update the SVG structure adding all the necessary code but the result miss the image.
UPDATE Here the demo: http://jsfiddle.net/uncoke/756DS/
If on debug I copy the new SVG code and open it in a new window I see the result I want. But on live... it wont load the img pattern. Here the heart of my script:
var svgns = "http://www.w3.org/2000/svg";
var img = document.createElementNS(svgns,'image');
img.setAttributeNS(null,'height','536');
img.setAttributeNS(null,'width','536');
img.setAttributeNS('http://www.w3.org/1999/xlink','xlink:href',pattern_url);
img.setAttributeNS(null,'x','-81');
img.setAttributeNS(null,'y','-81');
img.setAttributeNS(null, 'visibility', 'visible');
def= document.createElementNS(svgns,'defs');
pattern = document.createElementNS(svgns,'pattern');
pattern.setAttributeNS(null,'id','img_pattern');
pattern.setAttributeNS(null,'patternUnits','userSpaceOnUse');
pattern.setAttributeNS(null,'width','600');
pattern.setAttributeNS(null,'height','450');
pattern.appendChild(img)
def.appendChild(pattern)
side_1 = document.getElementById('side_1');
side_1.setAttributeNS(null,"fill","url(#img_pattern)")
side_2 = document.getElementById('side_2');
side_2.setAttributeNS(null,"fill","green")
side_3 = document.getElementById('side_3');
side_3.setAttributeNS(null,"fill","url(#img_pattern)")
On this test only the "fill","green" works.
Can you hep me ?

CKEditor: Different color palettes for Text Color and Background Color possible?

I am using CKEditor (v3.6.4) and try to find out how to change the palettes for Text Color and Background Color separately.
I found config.colorButton_colors in the docs which allows me to define the color palette. However, this palette is assigned to both, text and background.
How can I have two different palettes?
The best and easy way is, Include required plugin at the download time or link below
Ckeditor Builder
Yes its actually possible. Just dont pick colors from the config but rather do the following in colorbutton/plugin.js:
var textColors = '1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,' +
'16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,' +
'E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,' +
'D35400,C0392B,BDC3C7,7F8C8D,999,000';
var backgroundColors = 'cee8fe,b1d7ff,c7d3f3,dfd6eb,e4cafe,ffbbff,ffbfd2,ff9999,ffdeb3,ffefb0,f4f98a,ffffbb,d3f1a1,bbffbb,bbffff,a6e3dc,c1ebc7,eddec9,f2ebd3,d3eaf2,e1eff3,ffbe61,ffdc61,e1f29d';
var colors = (type == 'back') ? backgroundColors.split(',') : textColors.split(',');
You can't do that because the color palette is defined for the text color and background.
CKEDITOR.config.colorButton_colors =
'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' +
'B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,' +
'F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,' +
'FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,' +
'FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';
Or you can change the Text Color plugin :)

(RaphaelJS) - How to Fill the inside of a path?

I have a path for the RaphaelJS library, I can't seem to get the fill to change its color.
var mypage = ScaleRaphael('mainContainer', 1000, 1000);
mypage.setStart();
mypath.path('M794.33,21.5l152.3-0.76L946,21.5v-0.22l1.39,0.01l-1.17,206.61l-0.04,0.3l-0.15,0.27l-0.04,0.07l-0.18,0.35l-0.34,0.2 L786.4,321.59l-159.22,92.27l-2.12,1.18l-0.07-2.36v-1v-0.28l0.18-0.26l42.1-97.5l42.26-97.43l21.13-48.71l21.21-48.68 L794.33,21.5z M794.33,21.5l-41.46,97.76l-20.76,48.87l-20.84,48.83l-41.68,97.67l-41.78,97.59l0.18-0.54v1l-2.11-1.18 l159.08-92.46l159.23-92.21l-0.52,0.54l0.03-0.07l-0.14,0.57l2.04-206.6l1.39,0.01v0.22l0.13,0.77l-0.69,0L794.33,21.5z')
.attr({"type":"path","stroke":"none","fill":"blue"});
The path is created correctly but the fill attribute only makes the stroke blue and not the filling, what am i doing wrong?
Your path is shaped like a stroke, to make it fill modify the path by removing everything starting from the second M:
var stage = Raphael('stage',1000, 1000);
var path = stage.path('M794.33,21.5l152.3-0.76L946,21.5v-0.22l1.39,0.01l-1.17,206.61l-0.04,0.3l-0.15,0.27l-0.04,0.07l-0.18,0.35l-0.34,0.2 L786.4,321.59l-159.22,92.27l-2.12,1.18l-0.07-2.36v-1v-0.28l0.18-0.26l42.1-97.5l42.26-97.43l21.13-48.71l21.21-48.68 L794.33,21.5z')
.attr({"type":"path","stroke":"none","fill":"blue"});​
http://jsfiddle.net/YzMCG/
There is quite a nice explanation here that suggests adding a transparent fill to the CSS in order to hide the coloured fill and make it look like a path only:
Raphael Js can't fill path with Image

Resources