toe_head2001

CodeLab for average users - A Layman's Guide

Recommended Posts

This tutorial is available as a PDF. Click here to view or download it

Note: This guide is designed for laymen, and won't discus writing/editing code. If you know how to write code and want to do some development in CodeLab, please go read BoltBait's tutorials instead.

 

Introduction

Sometimes people, such as myself, will post some code, and tell you to go use it with something called CodeLab.

 

Q. What's this CodeLab thing?

A. In layman's terms, CodeLab is a plugin that allows you to write custom Effects within paint.net in real-time.

 

Q. It says "for advanced users", so why would you have me use it!?

A. That's what I hope to address with this guide.

 

Q. Ok, but since I don't write code, what all can I do with CodeLab?

A. Aside from the obvious running code that has been copied & pasted, you can build (create the .dll file) your own Effect plugins, or translate its User Interface into your native language.

 

Q. I can't tell the difference between ancient Greek and computer code, so is CodeLab safe for me to use?

A. It's extremely difficult to break something when using CodeLab. (If you do want to break something, you have to know what you're doing.) So, yes, it's safe for the "average Joe" to use.

:Warning: If you are copying & pasting code from an unfamiliar source, please exercise caution. Or exercise caution always...

 

Q. Assuming it's available, can I use the code from any paint.net plugin?

A. No. Some plugins require Visual Studio. If it's compatible with CodeLab, the original author will usually tell you.

 

Running Code

- Remove the existing code, and Copy & Paste the source code you want to run.

 

Here I have highlighted the code editor portion of CodeLab's interface.

CodeLab-codeArea.png

 

- After 3 seconds, the pasted source code will automatically execute.

 

- Press the OK button to confirm the changes to the current layer. (just like any other Effect in paint.net)

 

Creating a .DLL File

- Press the Save button. This will save the source code as a .cs file (cs aka C Sharp aka C#).

CodeLab-saveButton.png

 

- Press the Build DLL button. This will create a .dll file you can install as its own paint.net plugin.

CodeLab-buildDllButton.png

 

- and Press the Build button.

CodeLab-buildButton.png

 

- The built .dll file will be placed on your Desktop. You'll need install it, but there's also a handy batch file on your Desktop that will do it for you.

 

Translating into your Native Language

- Press the Interface Designer button.

CodeLab-UiButton.png

 

- Select a UI control from the list.

 

Here I have my 'Rubber Stamp' source code loaded into CodeLab, and the Roughness slider is selected.

CodeLab-Ui.png

 

- Type in your Translation (I typed "Rugosité"; French for Roughness ... I think)

- Press the Update button

- Press the OK button, or select another UI control to edit to repeat the process.

 

:Warning: You could also change the Default values, but you should not change the Min and Max.

 

Edited by toe_head2001
  • Upvote 6

Share this post


Link to post
Share on other sites

Nice :).

 

But - Note: This guide is designed for laymen.  What about us' wimin' :mrred: !

  • Upvote 1

Share this post


Link to post
Share on other sites
3 minutes ago, Pixey said:

What about us' wimin' :mrred: !

 

You have first to change your gender minimum to non-binary to be able using the tutorial. :lol:Don't forget to provide us with a certified copy of your new personal documents.

Edited by IRON67
  • Upvote 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now