SRL Archive - Research & Development Lounge

[Simba Plugin] MayaPlugin


Daniel

2012-01-26 11:15:08

Hey guys, here I present to you the MayaPlugin! :) A, well, umm… plugin for Simba! :D

Basically, it provides access to a few Windows API methods, quite a bit of fast methods found Embarcadero's Mathematical library, and quite a bit of other methods from external libraries too. Not to worry, all legal! :)

Hopefully most scripters will find these incredibly useful. NOTE, I plan to add to this plugin if I (or people) want some methods imported :)

[SCRIPTER] How do I use this plugin?
Simply extract the plugin to your plugins path, and then add the following after your program X; line:

{$loadlib MayaPlug.dll}

Methods Exported By The Plugin:
…follows (click the links to see documentation of the methods. If there is no link, look just below it ;)):

Enjoy :) Plugin is attached (it's extremely tiny!) :)

NOTE: Source WILL come tomorrow. I'm just too tired right now and about to head to bed. Don't worry, no "backdoors" or anything is hidden within this. I'm a Senior SRL Member for a reason ;) Also, most of these functions I have at least required once or twice (or more!) while scripting, hence why they are in there - plus a few additions I thought people would like :)

Kyle Undefined

2012-01-26 11:21:53

Bookmarked for testing later, this looks great! Good job :)

ReadySteadyGo

2012-01-26 13:20:18

Looks great Daniel, I'm thinking of implementing OpenGL into a plugin rather than directly into Simba now. Do you have any thoughts on whether this is possible?

nielsie95

2012-01-26 13:34:01

Are you sure everything is compatible between Delphi and FPC? Because I don't think passing arrays will work without some intervention. Other than that it's pretty cool :)

mormonman

2012-01-26 13:58:05

From: ReadySteadyGo
Looks great Daniel, I'm thinking of implementing OpenGL into a plugin rather than directly into Simba now. Do you have any thoughts on whether this is possible?


That's a horrible idea. Not when lazarus already has an OpenGL control package….

Shuttleu

2012-01-26 14:04:31

so with the encrypt and decrypt, how are they encrypted, and what with, is there no passwords or keywords to encrypt them with?

if this is secure then i will probably replace my current encryption for VV with this one as i think its probably the encryption that is causing most of the errors

~shut

Wizzup?

2012-01-26 14:10:17

From: mormonman
That's a horrible idea. Not when lazarus already has an OpenGL control package….


Why?

mormonman

2012-01-26 14:39:43

From: Wizzup?
Why?


Kinda reinventing the wheel right?

Shuttleu

2012-01-26 14:40:53

error time!
Exception in Script: Error loading plugin C:\Simba\Plugins\mayaplug.dll

and i get this

~shut

EDIT: getting this works http://www.dll-files.com/dllindex/dll-files.shtml?borlndmm

ReadySteadyGo

2012-01-26 15:00:09

From: mormonman
Kinda reinventing the wheel right?


Not at all, I wouldn't be rewriting anything, just grabbing FPC's OpenGL units from source and putting them into a plugin. I don't see why it's a horrible idea?

Shuttleu

2012-01-26 15:02:09

ugh, i cant get it to work
program new;
{$loadlib mayaplug}

begin
writeln(encryptfilea('C:\Users\Thomas\Desktop\VineVanquisherVbyShuttleu.simba'));
writeln(getlasterror);
end.
give me
False
0

~shut

Dgby714

2012-01-26 15:04:34

EncryptFile just sets the encrypt flag in ntfs.

Shuttleu

2012-01-26 15:08:01

From: Dgby714
EncryptFile just sets the encrypt flag in ntfs.


sooo.. im confused :s

mind explaining to me how to use it?

sorry, im not used to using the windows API

~shut

Brandon

2012-01-26 15:24:53

Simba 0.99 has encryption for RC6 and below.. I have to say its pretty damn good.. if not the best.. straight from David Barton.

For the encrypt file function he has above, see here: http://support.microsoft.com/kb/307877

It doesn't actually "Encrypt" the file in the way your thinking.. it just lets windows know that this file is "encrypted" and cannot be used/opened without changing the file properties to un-encrypted..
Its the same as right clicking a file/folder, pressing properties then encrypt.. doesn't do anything.. if compression explains it better then sure by all means use that definition.

Shuttleu

2012-01-26 15:34:23

oh, ok, never mind then

i shall look at RC6 then. any idea when 0.99 will be released?

~shut

Dgby714

2012-01-26 15:37:27

From: Wizzup?
You could use (the soon to get an release canditate) Simba 0.99. Expect it this weekend. It is portable by default.


This^

Wizzup?

2012-01-26 16:12:00

From: mormonman
Kinda reinventing the wheel right?


Well, compared to exporting it all in Simba I think it is less work, although I'm not sure if it would work WRT threading.

Anyway, let's stay on topic.

mormonman

2012-01-26 16:38:29

From: ReadySteadyGo
Not at all, I wouldn't be rewriting anything, just grabbing FPC's OpenGL units from source and putting them into a plugin. I don't see why it's a horrible idea?


I thought you were going to write the plugin in c/c++, the native OpenGL language..

ReadySteadyGo

2012-01-27 02:13:04

From: mormonman
I thought you were going to write the plugin in c/c++, the native OpenGL language..


No way, you're right, that would be a horrible idea. :P

bg5

2012-03-02 01:00:35

Just tried:
SumOfSquares([3,3]);
Math error at line 127
odd…

Daniel

2012-03-02 02:12:01

From: beginner5
Just tried:
SumOfSquares([3,3]);
Math error at line 127
odd…


Oh, hah, I completely forgot about this!

Yeah, umm, Delphi and Lazarus can't seem to share data which are of the real type for some reason :-/