I have no idea, haven't had the time to check it out myself! I would be surprised if it still works and supports the latest versions of xnormal, it's from 2009! But you never know.
The goal is to setup and send the mesh that you have in your scene directly to xNormal without using the default UI. The base of the script work, I need to support some other things (like Cages, blockers, FBX and SBM format).
I also need some optimization on the way I handle the xml file by the way (currently I rewrote it for every parameter).
Latter I will add more options for the textures (AO rays, and so on).
One thing that would be useful is to be able to store the presets for each object in the scene. Not sure if you can do this in Maya, but in 3dsmax you sure can.
This way, in a work environment, other users can open 3dsmax files and re-render the maps with the same settings if needed.
could add it as custom attributes to something that doesn't get exported, like one of the default cameras? Then there's no crap nodes floating around either. Haven't tried it though.
could add it as custom attributes to something that doesn't get exported, like one of the default cameras? Then there's no crap nodes floating around either. Haven't tried it though.
In max you could add it to the user defined properties of the object. This way, even if the object is merged to other scenes it will carry the xnormal preset. Maybe there is an equivalent in Maya, so there is no need to have extra nodes in the scene.
you can add custom attributes to almost any node in Maya. Personally I don't like this too much as there's a danger it could interfere with something (I'm paranoid ) or the clients QA tools clear it out or whatever.
In max custom attributes suck a lot (you're talking about those?). it seems like the mxs code gets somehow attached directly to the object. It's not just a simple data field that's added.
you can add custom attributes to almost any node in Maya. Personally I don't like this too much as there's a danger it could interfere with something (I'm paranoid ) or the clients QA tools clear it out or whatever.
In max custom attributes suck a lot (you're talking about those?). it seems like the mxs code gets somehow attached directly to the object. It's not just a simple data field that's added.
I just did a quick test, the user defined properties are embedded in the object. If you merge from one scene to another the data is preserved. So the data is not stored in the scene itself.
But I agree, they suck because other script can overwrite that data easily.
It should work the same way "custom properties" work for max scenes. Where you can create properties with their IDs and it's a lot more difficult to accidentally delete custom properties other scripts are using.
The safest way to use the "user defined properties" is to use "getUserProp" and "setUserProp", which allows you to assign a string to a key. In this case the xml as a string.
And just hope that other scripts don't use "setUserPropBuffer" or "getUserPropBuffer"
So anyway, if Froyok could implement that in Maya, I'm sure that would be useful for Maya users
I'm actually trying to get a little UDK script to work in 3DS Max, while using the user defined properties on objects. Of course there is a chance that other scripts might overwrite your properties, however it should only happen if they use the same name, so if you make an unique enough name, you shouldn't have an issue, don't know if its the same in Maya.
Its the only way I can come up with, for storing information, which won't get broken if you have to reinstalling window/3ds max, and which doesn't create a lot of extra files.
I'm actually trying to get a little UDK script to work in 3DS Max, while using the user defined properties on objects. Of course there is a chance that other scripts might overwrite your properties, however it should only happen if they use the same name, so if you make an unique enough name, you shouldn't have an issue, don't know if its the same in Maya.
Its the only way I can come up with, for storing information, which won't get broken if you have to reinstalling window/3ds max, and which doesn't create a lot of extra files.
I'm also using the user defined properties for the objects in my UDK Sync script.
The alternative method, like I mentioned before, would be to use the custom file properties to store the information.
a series of little documentation pics I created while working on a stage3D (AS3 / AIR on Android/ iOs). Its a tank game like battle city.
I did manage to write an export option for sparrow / starling for their bitmap font and sprite sheet in shoebox. A font test
For a collision detection I was trying out some ideas I drew first down on paper. It scans booth x and y steps within a grid to see if their connected cells are solid or not
It is fairly efficient even on a mobile device because it keeps the loops to a minimum.
at first the tanks didn't like it - getting stuck etc.
but then I added a safe margin
and it would only get stuck only on corners
but with some additional predictions (e.g 1 out of 3 rays cast through) I could make them move in the right direction even though the input is not that precise
I'm revisiting my Unity vertex painter, which I've let sit and rot for months now. Decided to take a crack at adding flow map painting functionality to it, and it turned out to be much less painful than I'd anticipated.
Gonna sort some ideas out wrt mesh/asset data this weekend, then hopefully release it into the wild.
I'm revisiting my Unity vertex painter, which I've let sit and rot for months now. Decided to take a crack at adding flow map painting functionality to it, and it turned out to be much less painful than I'd anticipated.
Gonna sort some ideas out wrt mesh/asset data this weekend, then hopefully release it into the wild.
that's totally awesome LoTekK, any plans on releasing it publicly?
Cheers fellas. I'm definitely going to be releasing it, once I've sorted out a couple things with regards to handling the instanced mesh data.
ZeroCartin:
Not currently using this for anything specific. It was just that vertex painting seemed a tool glaringly missing from Unity, so I decided to make one. Then while I was doing that, I decided to add flow map painting to it, since the base functionality was already there.
Unless you meant what the flow maps can be used for, in which case:
The goal is to setup and send the mesh that you have in your scene directly to xNormal without using the default UI. The base of the script work, I need to support some other things (like Cages, blockers, FBX and SBM format).
I also need some optimization on the way I handle the xml file by the way (currently I rewrote it for every parameter).
Latter I will add more options for the textures (AO rays, and so on).
Hi, nice, I made same tool for 3ds max that also support batch. Maybe I should clean up my code and release it to public.
but with some additional predictions (e.g 1 out of 3 rays cast through) I could make them move in the right direction even though the input is not that precise
how does this compare to a more traditional approach with astar pathfinding?
how does this compare to a more traditional approach with astar pathfinding?
its not tile based but works on any rectangular geometry + its easier for me to implement it on moving or dynamic geometry within the level.
also related early prototype with 3d sprites and 4 players, on the right I have a max setup and a maxscript that renders each object individually per frame as a sprite.
9 slice or 9-patch detection
It searches for clusters and within each looks for repeating slices (looping) and marks them. The idea is to have it export to the Android .9.png format, css3 9-slice and some other framework formats. Right now this fully automated but i'll add some user input control's to remove or adjust slices.
Path-9 or 9-slice images are scale able ui building blocks that stretch out the parts that can loop while keeping the proportions on those areas that need it.
I have tried to become familiar with Photoshop JavaScript and made a mini-animation toolset for Photoshop. 2D animation has always been awkward in the program so I tried to do it in a way I like.
I have never worked with such a frustrating scripting system before. Some parts can only be accessed by an event listener, which causes really hard-to-understand code, other parts can't even be accessed or queried. Did you know that you can't show a window with JavaScript UNLESS the script is processing something in the background? The window is removed the second the script is done.... I spent more time fighting the functions and datatypes in Photoshop than working on the actual logic and functionality of the code.
the onion skin part is way slower during recording than it actually is
I might consider diving into the plugin system next. I hope that it is better thought out than the scripting system.... But then, I have read some discouraging things about the SDK. I hope it's not THAT bad.
DENNY: before going all the way C++, look into Flash panels. Flash panels can give you persistent non-modal UIs (what you describe is ExtendScript's modal dialogues - which block everything until you close them), which is a big step up from ExtendScript. Grab FlashDevelop IDE, and the Photoshop CS5 SDK and you're ready to go.
Flash panels can call ExtendScript easily, or you can access Photoshop directly from ActionScript - although I don't know if it offers deeper access than Extendscript or not. It's easier than C++ though and there's no need to deal with x86 and x64 compiling either.
Google for "Photoshop Panel Developer's Guide Win.zip". It's got all to get you started, including calling ExtendScripts from a panel.
What's a bit annoying is packaging, but as long as you can cram all your code in a single JSX then you're fine. Use the extension manager to package everything and it's easy to distribute.
Very interesting! Scripts for PS is something I wanted to try out for a long time... being so spoiled by XSI's API I'd get frustrated in seconds it seems tho...
Feeling a bit noobish for just posting something as trivial as this, but anyways:
A small vertex color edit script to quickly change the channel(s) you want. I wrote a more basic version for a friend who wanted to get rid of vertex color AO but keep light colors which were in the AO, too. Extended it a bit to have some more functionality and checks so it doesn't mess anything up.
Eric Chadwick >> I have had my fair amount of visits to that site, it's a good resource.
kwramm >> Thanks man, I'll look into it. I'm not a fan of having to get Flash just to make a UI, but I think I can manage. As it is now all code is in the same jsx-file, I use dummy-files with an include + function call to get around the limit of Photoshop demanding an actual script file to call a function.
Regarding the window;
var win = new Window('palette', title); // 'palette' or 'window'
or
var win = new Window('dialog', title);
It seems the palette/window dialog does not override accessing other parts of Photoshop, the script continues to run despite no user interaction in the UI. The dialog on the other hand pause everything until an action is given. What annoys me is that palette/window disappears the second the script is done. I thought I'd elaborate if anyone was curious... I don't get why I have to use Flash to make a simple persistent window with two buttons.
I'm not a fan of having to get Flash just to make a UI
I thought the same before I tried it, but trust me, it's awesome compared to jsx. It integrates much nicer into PS and feels more like its a part of the application.
You don't need the traditional "Adobe Flash". You can do everything in code in an IDE (FlashDevelop). The syntax and structure is not too different from javascript / HTML. Your code then gets compiled to a .swf. Dump that into plug-ins/panels and voila! I wouldn't say it's any more annoying than writing extendscripts and dealing with the ESTK.
PM me if you have questions on how to get started.
Kwramm, I tried the flash panels back when I was getting into Photoshop scripting and it never worked out. Though I ended up using FlashBuilder or Flex I think and the code of that was just terrible to look at haha. Mind posting like a quick sample file to look at?
I appreciate the help Kwramm, I'll make sure to poke you if I get stuck. I'm currently installing FlashDevelop, hopefully I'll have a panel made this evening.
Edit*
I thought it would be easier with the installation. If I have FlashDevelop installed, what do I not have in regards to make a Flash panel for Photoshop? FlashDevelop had several things included, like Flex 3 and Flex 4. I thought I'd better ask here if someone else is curious about the same things as me, hope you don't mind.
Edit**
I'll start without FlashDevelop and just follow the Adobe Photoshop Panel Developer's Guide with the recommended downloads until I understand that.
Edit***
Scratch that, I'm back to FlashDevelop. I don't want to mess with Flash Builder student versions and stuff. This is starting to become confusing.
Edit***
Scratch that, I'm back to FlashDevelop. I don't want to mess with Flash Builder student versions and stuff. This is starting to become confusing.
Yup. Whats confusing is that I was following some older tutorials for Flex and well apparently stuff changed in CS5 then I just eventually gave up and got stuck haha. might take a stab again
^ Call that double stuck now. CS5 needs Flex SDK 3.*, all guides regarding FlashDevelop and Flex 3 are outdated in regards to the UI. I managed to link the SDK version and compile a simple Hello World; all I got was a blank Flash player canvas... I think I'm giving up on this, learning DirectX11 (and maybe WPF) is a lot more tempting right now.
^ triple stuck
I think I tried 3-4 times but every time I revisited things it changed all again and I couldn't make thins run within time. The other thing is that with a professional Adobe developer license you get apparently all the easy tools to make it work, without that you are left in the dark to figure things out.
[ame="http://www.youtube.com/watch?v=Y9uIndEwI9w"]what the deuce - YouTube[/ame]
Cool glitch with custom CGFX shaders... Happens in every profile
This is not really an issue, I guess, but does anyone know why Viewport 2.0 is stupid like this? It wants to swizzle normal.xyz to normal.yxz for some reason. BUT, it's only when I select or deselect the object O_o
-It works in High Quality, and Default Quality though
^Same issue in the latest versions of Max I'm afraid, as soon as you move a light source or dolly the mesh after applying the shader, it breaks the Tangents of the Normals. Autodesk voodoo behind the scene's I say!
I'm guessing (in the case of Max, so this could apply to Maya also or not) it recalculates the Normals of the mesh after each change in world space, so that it keeps the same space volume in the editor all the time, no matter where the camera is pointing or what kind of changes occurred in the scene, and the only solution to it is I found that resetting the X-Form of the mesh after each change will cure the issue (as long as I don't move anything again, it works fine, or I need to invert my Normal Map if I rotate the model).
In case of your video, it looks like Maya is simply reiterating the Normals after an action is performed and it's trying to 'rebuild' them to the default values Maya usually supports (-X, etc) before applying the shader's math and substituting for it (maybe performance reasons? Or maybe a behind the scene caching to avoid the issue which Max has, so when you flip the Normals or Mesh, it gets calculated correctly?)
Again, I'm talking all out of my ass, but I can say for sure that AD has done something to the Viewport in which model's don't like being touched after a shader is applied as they try and 'default' the Normals, broken or not, both Maya and Max.
Simple Flash panel guide for PS CS5:
Get Flash Develop 4.0.4 (only need to check the Flash plugin when installing), Adobe Photoshop CS5 SDK, Adobe Creative Suite SDK (the CS6 version is ok - this includes Flex 3.4, which we'll need) and of course Photoshop CS5 (x86/x64 doesn't matter).
Start a new "Flex 3 Project". Edit the main.mxml file. MXML is like HTML, there are tags which define the UI and there's a script tag where your ActionScript goes (in HTML you put Javascript code there).
Right click the project "add - Library" and pick CSXSLibrary-2.0-sdk-3.4.swc from PhotoshopCS5SDK/flashpanels/libraries. This is the Photoshop library so we can talk to PS.
Right click on the project: Properties -> SDK -> Browse (Custom SDK) and pick CS-SDK/CS Flex SDK 3.4.0 folder. This is the SDK we're using to compile the project for.
MAIN.MXML:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
backgroundColor="0xd6d6d6"
backgroundGradientColors="[0xd6d6d6,0xd6d6d6]"
creationComplete="init()">
<mx:Script>
<![CDATA[
import com.adobe.csxs.core.CSXSInterface;
public function init():void {
// initilization! let's do something here....
}
public function btnClicked():void {
CSXSInterface.instance.evalScript("myFunction");
}
]]>
</mx:Script>
<mx:Button label="test" x="10" y="10" click="btnClicked();" />
</mx:Application>
Build it, check that there's a .swf in your project's bin folder. You can also run it in Flash Develop, but it's only good to test the UI. Obviously anything requiring Photoshop will not work when launching from Flash Develop.
EXTENDSCRIPT save as <same-name-your-projects-swf>.jsx
function myFunction() {
alert("hi!");
}
This script makes a simple planel with a button. When pressing the button it calls myFunction in the jsx. Copy the .jsx and the .swf into Photoshop's Plug-ins/panels folder. Make sure the swf and jsx have the same name, except for the extension! Otherwise the swf cannot find the jsx.
Start CS5, choose Window -> Extensions -> <your-extension> to run the panel.
I think it should be entirely possible to do almost everything you do in a jsx in ActionScript itself. But if you already know extendscript or have existing scripts which just lack a decent UI, you may want to go the route of just calling the jsx scripts from your panel.
Personally I will keep the UIs in Flash because it's non modal and offers better integration than ExtendScript. I will keep they business logic in ExtendScript because it's easier to debug in the ESTK. I don't know yet if ActionScript is any faster then ExtendScript though, which can be quite slow sometimes.
Where to go from here?
- Download the Photoshop Panel Developer's Guide from Adobe (google for it) and do the tutorials there.
- Read up on some ActionScript / Flex. Get the Adobe Air SDK - it offers libraries not included in the CS SDK, which allow you e.g. local file access.
renderhjs: I don't have the professional license, but from what I gathered most of the tools you get help with packaging and distributing. Packaging is a bit of a hassle, but since you distribute AIR apps, you will be familiar with a lot of stuff - e.g. the certificates. Then again, for in-house distribution it's much simpler: you can just copy stuff into Plug-ins/Panels and avoid the Adobe extension manager.
P.S. going to post an example later of how to exchange data btw jsx and the panel. This is very poorly documented by Adobe, but probably one of the things you need most if you want to make use of the panel's advanced UI.
I'm throwing all my money at the screen but nothing is happening! Great post Kwraam, I don't get why Adobe can't post a brief todo like that.
---
I followed your walkthrough except I skipped the Adobe Creative Suite SDK step. I downloaded Flex 3.4.0A and Flex 3.6A from here instead. Both versions seems to be compiling just fine! I got the button and it's working!
Adding one of my own buttons as a test is like the best thing that I've managed to do with Photoshop in quite a while. Thanks again Kwramm! Now I can finally put this thing together for easy release.
Update with a very simple panel. Some few buttons can make life easier it seems. This marks the end for my Photoshop adventures for this time. Thanks again Kwramm for the help!
Replies
I will post an usable version soon, I have added the FBX/SBM format and I'm working on the blocker files.
Sweet man! Thanks for linking that!
One thing that would be useful is to be able to store the presets for each object in the scene. Not sure if you can do this in Maya, but in 3dsmax you sure can.
This way, in a work environment, other users can open 3dsmax files and re-render the maps with the same settings if needed.
In max you could add it to the user defined properties of the object. This way, even if the object is merged to other scenes it will carry the xnormal preset. Maybe there is an equivalent in Maya, so there is no need to have extra nodes in the scene.
In max custom attributes suck a lot (you're talking about those?). it seems like the mxs code gets somehow attached directly to the object. It's not just a simple data field that's added.
I just did a quick test, the user defined properties are embedded in the object. If you merge from one scene to another the data is preserved. So the data is not stored in the scene itself.
But I agree, they suck because other script can overwrite that data easily.
It should work the same way "custom properties" work for max scenes. Where you can create properties with their IDs and it's a lot more difficult to accidentally delete custom properties other scripts are using.
The safest way to use the "user defined properties" is to use "getUserProp" and "setUserProp", which allows you to assign a string to a key. In this case the xml as a string.
And just hope that other scripts don't use "setUserPropBuffer" or "getUserPropBuffer"
So anyway, if Froyok could implement that in Maya, I'm sure that would be useful for Maya users
[EDIT] The current version is available here : http://www.polycount.com/forum/showthread.php?t=104791
Its the only way I can come up with, for storing information, which won't get broken if you have to reinstalling window/3ds max, and which doesn't create a lot of extra files.
I'm also using the user defined properties for the objects in my UDK Sync script.
The alternative method, like I mentioned before, would be to use the custom file properties to store the information.
[ame="http://www.youtube.com/watch?v=KQj62-lubI0"]UDK dX9 mode fire effect with flames WIP - YouTube[/ame]
I did manage to write an export option for sparrow / starling for their bitmap font and sprite sheet in shoebox. A font test
For a collision detection I was trying out some ideas I drew first down on paper. It scans booth x and y steps within a grid to see if their connected cells are solid or not
It is fairly efficient even on a mobile device because it keeps the loops to a minimum.
at first the tanks didn't like it - getting stuck etc.
but then I added a safe margin
and it would only get stuck only on corners
but with some additional predictions (e.g 1 out of 3 rays cast through) I could make them move in the right direction even though the input is not that precise
I'm revisiting my Unity vertex painter, which I've let sit and rot for months now. Decided to take a crack at adding flow map painting functionality to it, and it turned out to be much less painful than I'd anticipated.
Gonna sort some ideas out wrt mesh/asset data this weekend, then hopefully release it into the wild.
that's totally awesome LoTekK, any plans on releasing it publicly?
ZeroCartin:
Not currently using this for anything specific. It was just that vertex painting seemed a tool glaringly missing from Unity, so I decided to make one. Then while I was doing that, I decided to add flow map painting to it, since the base functionality was already there.
Unless you meant what the flow maps can be used for, in which case:
Did up a quick video to record some shader testing with it.
[ame="http://www.youtube.com/watch?v=U_Nyo_2fDfU"]Flow map painting - YouTube[/ame]
Hi, nice, I made same tool for 3ds max that also support batch. Maybe I should clean up my code and release it to public.
how does this compare to a more traditional approach with astar pathfinding?
http://www.polycount.com/forum/showthread.php?t=97168&page=3
its not tile based but works on any rectangular geometry + its easier for me to implement it on moving or dynamic geometry within the level.
also related early prototype with 3d sprites and 4 players, on the right I have a max setup and a maxscript that renders each object individually per frame as a sprite.
9 slice or 9-patch detection
It searches for clusters and within each looks for repeating slices (looping) and marks them. The idea is to have it export to the Android .9.png format, css3 9-slice and some other framework formats. Right now this fully automated but i'll add some user input control's to remove or adjust slices.
Path-9 or 9-slice images are scale able ui building blocks that stretch out the parts that can loop while keeping the proportions on those areas that need it.
I have never worked with such a frustrating scripting system before. Some parts can only be accessed by an event listener, which causes really hard-to-understand code, other parts can't even be accessed or queried. Did you know that you can't show a window with JavaScript UNLESS the script is processing something in the background? The window is removed the second the script is done.... I spent more time fighting the functions and datatypes in Photoshop than working on the actual logic and functionality of the code.
[ame="http://www.youtube.com/watch?v=CLmcunuOdI4"]photoshop animationextras - YouTube[/ame]
I might consider diving into the plugin system next. I hope that it is better thought out than the scripting system.... But then, I have read some discouraging things about the SDK. I hope it's not THAT bad.
It doesn't help that the Adobe scripting/SDK help are sorta a-holes.
http://ps-scripts.com/
Flash panels can call ExtendScript easily, or you can access Photoshop directly from ActionScript - although I don't know if it offers deeper access than Extendscript or not. It's easier than C++ though and there's no need to deal with x86 and x64 compiling either.
Google for "Photoshop Panel Developer's Guide Win.zip". It's got all to get you started, including calling ExtendScripts from a panel.
What's a bit annoying is packaging, but as long as you can cram all your code in a single JSX then you're fine. Use the extension manager to package everything and it's easy to distribute.
Feeling a bit noobish for just posting something as trivial as this, but anyways:
A small vertex color edit script to quickly change the channel(s) you want. I wrote a more basic version for a friend who wanted to get rid of vertex color AO but keep light colors which were in the AO, too. Extended it a bit to have some more functionality and checks so it doesn't mess anything up.
Link to download.
kwramm >> Thanks man, I'll look into it. I'm not a fan of having to get Flash just to make a UI, but I think I can manage. As it is now all code is in the same jsx-file, I use dummy-files with an include + function call to get around the limit of Photoshop demanding an actual script file to call a function.
Regarding the window;
It seems the palette/window dialog does not override accessing other parts of Photoshop, the script continues to run despite no user interaction in the UI. The dialog on the other hand pause everything until an action is given. What annoys me is that palette/window disappears the second the script is done. I thought I'd elaborate if anyone was curious... I don't get why I have to use Flash to make a simple persistent window with two buttons.
I thought the same before I tried it, but trust me, it's awesome compared to jsx. It integrates much nicer into PS and feels more like its a part of the application.
You don't need the traditional "Adobe Flash". You can do everything in code in an IDE (FlashDevelop). The syntax and structure is not too different from javascript / HTML. Your code then gets compiled to a .swf. Dump that into plug-ins/panels and voila! I wouldn't say it's any more annoying than writing extendscripts and dealing with the ESTK.
PM me if you have questions on how to get started.
Edit*
I thought it would be easier with the installation. If I have FlashDevelop installed, what do I not have in regards to make a Flash panel for Photoshop? FlashDevelop had several things included, like Flex 3 and Flex 4. I thought I'd better ask here if someone else is curious about the same things as me, hope you don't mind.
Edit**
I'll start without FlashDevelop and just follow the Adobe Photoshop Panel Developer's Guide with the recommended downloads until I understand that.
Edit***
Scratch that, I'm back to FlashDevelop. I don't want to mess with Flash Builder student versions and stuff. This is starting to become confusing.
Yup. Whats confusing is that I was following some older tutorials for Flex and well apparently stuff changed in CS5 then I just eventually gave up and got stuck haha. might take a stab again
I think I tried 3-4 times but every time I revisited things it changed all again and I couldn't make thins run within time. The other thing is that with a professional Adobe developer license you get apparently all the easy tools to make it work, without that you are left in the dark to figure things out.
Cool glitch with custom CGFX shaders... Happens in every profile
This is not really an issue, I guess, but does anyone know why Viewport 2.0 is stupid like this? It wants to swizzle normal.xyz to normal.yxz for some reason. BUT, it's only when I select or deselect the object O_o
-It works in High Quality, and Default Quality though
I'm guessing (in the case of Max, so this could apply to Maya also or not) it recalculates the Normals of the mesh after each change in world space, so that it keeps the same space volume in the editor all the time, no matter where the camera is pointing or what kind of changes occurred in the scene, and the only solution to it is I found that resetting the X-Form of the mesh after each change will cure the issue (as long as I don't move anything again, it works fine, or I need to invert my Normal Map if I rotate the model).
In case of your video, it looks like Maya is simply reiterating the Normals after an action is performed and it's trying to 'rebuild' them to the default values Maya usually supports (-X, etc) before applying the shader's math and substituting for it (maybe performance reasons? Or maybe a behind the scene caching to avoid the issue which Max has, so when you flip the Normals or Mesh, it gets calculated correctly?)
Again, I'm talking all out of my ass, but I can say for sure that AD has done something to the Viewport in which model's don't like being touched after a shader is applied as they try and 'default' the Normals, broken or not, both Maya and Max.
Get Flash Develop 4.0.4 (only need to check the Flash plugin when installing), Adobe Photoshop CS5 SDK, Adobe Creative Suite SDK (the CS6 version is ok - this includes Flex 3.4, which we'll need) and of course Photoshop CS5 (x86/x64 doesn't matter).
Start a new "Flex 3 Project". Edit the main.mxml file. MXML is like HTML, there are tags which define the UI and there's a script tag where your ActionScript goes (in HTML you put Javascript code there).
Right click the project "add - Library" and pick CSXSLibrary-2.0-sdk-3.4.swc from PhotoshopCS5SDK/flashpanels/libraries. This is the Photoshop library so we can talk to PS.
Right click on the project: Properties -> SDK -> Browse (Custom SDK) and pick CS-SDK/CS Flex SDK 3.4.0 folder. This is the SDK we're using to compile the project for.
MAIN.MXML: Build it, check that there's a .swf in your project's bin folder. You can also run it in Flash Develop, but it's only good to test the UI. Obviously anything requiring Photoshop will not work when launching from Flash Develop.
EXTENDSCRIPT save as <same-name-your-projects-swf>.jsx
This script makes a simple planel with a button. When pressing the button it calls myFunction in the jsx. Copy the .jsx and the .swf into Photoshop's Plug-ins/panels folder. Make sure the swf and jsx have the same name, except for the extension! Otherwise the swf cannot find the jsx.
Start CS5, choose Window -> Extensions -> <your-extension> to run the panel.
I think it should be entirely possible to do almost everything you do in a jsx in ActionScript itself. But if you already know extendscript or have existing scripts which just lack a decent UI, you may want to go the route of just calling the jsx scripts from your panel.
Personally I will keep the UIs in Flash because it's non modal and offers better integration than ExtendScript. I will keep they business logic in ExtendScript because it's easier to debug in the ESTK. I don't know yet if ActionScript is any faster then ExtendScript though, which can be quite slow sometimes.
Where to go from here?
- Download the Photoshop Panel Developer's Guide from Adobe (google for it) and do the tutorials there.
- Read up on some ActionScript / Flex. Get the Adobe Air SDK - it offers libraries not included in the CS SDK, which allow you e.g. local file access.
renderhjs: I don't have the professional license, but from what I gathered most of the tools you get help with packaging and distributing. Packaging is a bit of a hassle, but since you distribute AIR apps, you will be familiar with a lot of stuff - e.g. the certificates. Then again, for in-house distribution it's much simpler: you can just copy stuff into Plug-ins/Panels and avoid the Adobe extension manager.
P.S. going to post an example later of how to exchange data btw jsx and the panel. This is very poorly documented by Adobe, but probably one of the things you need most if you want to make use of the panel's advanced UI.
---
I followed your walkthrough except I skipped the Adobe Creative Suite SDK step. I downloaded Flex 3.4.0A and Flex 3.6A from here instead. Both versions seems to be compiling just fine! I got the button and it's working!
Adding one of my own buttons as a test is like the best thing that I've managed to do with Photoshop in quite a while. Thanks again Kwramm! Now I can finally put this thing together for easy release.
With AS3 instead of JSX as a main language it should be a lot easier to deal with loops, logics etc.
[ame="http://www.youtube.com/watch?v=fP-W843B1Ms"]animation panel - YouTube[/ame]
Download here - just extract, copy and paste.
---
Edit*
I added color for onion skins, user settings to modify the colors, and fixed some small bugs that haunted the script.
[ame="http://www.youtube.com/watch?v=9wvQpazGpHI"]animation panel onion skin colors - YouTube[/ame]