Page 2 of 2

Posted: Thu Dec 08, 2011 11:10 pm
by mykylr
Sounds like what I am looking for. Pity not possible for osx though.

Mike

Posted: Sun Dec 11, 2011 4:30 am
by Rudiger
mykylr wrote:Sounds like what I am looking for. Pity not possible for osx though.

Mike
Actually, that may no longer be the case with version 8.1! Unfortunately, I don't have a Mac to experiment with.

The first step would be to get the GD lua library working with a standalone version of Lua on your system. I couldn't find a precompiled version for OSX, but you can download the source package from here:
http://sourceforge.net/projects/lua-gd/ ... %205.1%29/

I believe OSX is a posix style OS, so it should be fairly straight forward.

The next test will be to copy the GD binaries to your AS folder and write a quick AS lua script with the line:
require "gd"

If that doesn't give an error, then it would be worth trying out PonySmasher's bitmap drawing script.

If anyone wants to donate to me an old MacBook, I would be happy to give it a try myself :).

Posted: Sun Dec 11, 2011 9:51 am
by ulrik
Rudiger wrote:
...... write a quick AS lua script with the line:
require "gd"
.
How would I do that, and where?

Posted: Sun Dec 11, 2011 2:50 pm
by Rudiger
ulrik wrote:
Rudiger wrote:
...... write a quick AS lua script with the line:
require "gd"
.
How would I do that, and where?
Something like this:

Code: Select all

-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************

ScriptName = "RT_GDTest"

-- **************************************************
-- General information about this script
-- **************************************************

RT_GDTest = {}


function RT_GDTest:Name()
	return "GD Test Script"
end

function RT_GDTest:Version()
	return "0.1"
end

function RT_GDTest:Description()
	return "Quick test script for testing GD library"
end

function RT_GDTest:Creator()
	return "Rudiger"
end

function RT_GDTest:UILabel()
	return "RT: GD Test"
end

function RT_GDTest:LoadPrefs(prefs)
	
end

function RT_GDTest:SavePrefs(prefs)

end

function RT_GDTest:ResetPrefs()

end


-- **************************************************
-- Recurring values
-- **************************************************

-- **************************************************
-- The guts of this script
-- **************************************************
require "gd"

function RT_GDTest:Run(moho)

    -- If you are feeling adventurous, you could try out some gd functions here, eg
        		
    local layer = moho.layer
    local layerImage, im
    if layer:LayerType() == MOHO.LT_IMAGE then
         layerImage = moho:LayerAsImage(layer):SourceImage()	
         im = gd.createFromPng(layerImage)
    end
end

Posted: Mon Dec 12, 2011 9:51 pm
by ulrik
Thank you Rudiger!

Help Please

Posted: Fri Mar 02, 2012 12:30 pm
by 2dee
Hi Ponysmasher and All

Please could you tell me how to use the script; i have installed the files
into the main Anime Pro 8 folder but when i launch Anime Pro 8 i cannot see anything new or any new icons or toolbar.

I tried to create a new PNG layer from the layers menu but there is no entry in the menu to create one.

I have also loked in the Scripts menu for an entry but ther is nothing new in the menu since installing the files.

Maybe i am missing something here; or i am doing something wrong.

Please can you advise on how to use the tool; and where i can see the tool
in Anime Pro 8.

Many thanks.

2dee.

Posted: Fri Mar 02, 2012 8:01 pm
by jhaustin1969
There's a pretty comprehensive list of add-ons for Lua here:
http://lua-users.org/wiki/LibrariesAndBindings
I have added this link to the Anime Studio Toolbar & Website.

I'll keep my eye on this script too and may add that in the future.

Great work Ponysmasher!!

Thank you,
Joe

Posted: Fri Mar 02, 2012 10:37 pm
by dueyftw
2dee

Everything needs to be in its right place. Placing a tool script in main folder will not work.

Open the 'main' then look for 'scripts' you will see other folders. Tool, menu and utility. Now open the new script that you downloaded. The author will have put it in to a folder named tool, or menu. Drag the new tools into the proper folder.

If the new tool is an replacement with the same as an 'lm_' name, it is wise to make a copy placed out side the scripts folder. Just in case you don't like the new one.

Dale

Posted: Fri Mar 02, 2012 10:53 pm
by jonbo
Hey Dale, this script is a little different. The contents of the zip needs to be extracted to the main folder as there are a couple of .dll files that need to be in the main folder. If the script is installed correctly the .lua will be placed into the script>tool folder and you should see a icon in the other section of the tool palette.

Posted: Sat Mar 03, 2012 1:18 am
by dueyftw
Ya, your right. I forgot about all the dll that need to be in the main folder.

Sorry.

Dale

Still not showing for me

Posted: Wed Mar 07, 2012 2:01 pm
by 2dee
Hi All

Thanks for the reply, i had installed the lua script and dlls as per instructions but the tool icon still does not show any where?

Shouls i be doing something else for the tool to show on any of the tool bars?

Thanks for your help

2dee.

Posted: Wed Mar 07, 2012 3:02 pm
by jonbo
Make sure these two things are installed in the correct place. This image shows where they should be.

Image

What Image?

Posted: Fri Mar 09, 2012 10:23 am
by 2dee
Hi jonbo

Thanks for your reply, i think an image you want me to look at is missing from your post?

"Make sure these two things are installed in the correct place. This image shows where they should be"

Cheers.

2dee