BATCH RENDER FOLDER
Ok I want to learn how to make my own UI for python plugins I end up wanting to make (i'm in learning mode now so not actually making anything yet)
1) So I went to
this clicked the required files link and clicked the main.py link to check the code.
2) Next I clicked the Raw button at the top of the code to remove the line numbers
3) I then selected all the code and copied it.
4) Went to my folder where Im saving all my iClone python plugins and created a text file.
5) Renamed it to BatchRenderFolder.py (not main.py because I don't want to do it that way yet)
6) I then loaded the file into Notepad++ (I like using this)
7) Then I pasted the code I copied into the file and saved it
8) Now, because I want to do it with method 2 and not method 1 (
as shown here) I did this
a) Method 1 must have a function named as
def initialize_plugin(): Method 2 must have a function names as
def run_Script(): So I renamed the initialize_plugin function to run_Script to suit the way it needs to be for method 2
b) I noticed at the bottom of the code there was another function also called run_Script that simply called the initialize_plugin fuction.
So it became obvious to me, in reality even method 1 is run initially by run_Script and not initialize_plugin. Hmmmmm, maybe I could have just left the code as it was?
Anyway, I just deleted the run_Script function at the bottom and its call to initialize_plugin and left the one at the top changed to run_Script.
9) Finally I loaded the file into iClone after I opened it and here is the result. Double click it to see the full size of it.
Yep, errors. After checking the error codes to see which lines were generating the errors I saw there are other things in this
link that are being used by it that I haven't included. But also the way its written I needed to change to suit my style.
So
1) I opened the BatchRender.ui file on the site, removed the line numbers, copied the code, created a text file and renamed it the same as this, opened it into Notepad++, passed the code into it and saved it.
I then went back to the site, opened the icon folder, clicked the load.svg link right clicked the image and saved it to my iClone python folder.
2) Then I changed line 70 from this
ui_file = QFile(os.path.dirname(__file__) + "/BatchRender.ui") to this ui_file = QFile("E:/Reallusion7/Pythons/BranchRenderFold/BatchRender.ui")
3) Finally I changed line 85
from this
ui_sel_folder_btn.setIcon(QPixmap(os.path.dirname(os.path.abspath(__file__))+"\\icon\\Load.svg")) to this
ui_sel_folder_btn.setIcon(QPixmap("E:\\Reallusion7\\Pythons\\BranchRenderFold\\icon\\Load.svg"))And here is the result. Again, double click it to see full size.
OK, that's good enough for me to spend time now figuring out and experimenting with creating User Interface plugins. And then I will need to start looking into understand the code styles and names used for making it do things with animations etc etc. And finally when I am familiar with all that I will actually start making things that I see will be useful.
i7-3770 3.4GHz CPU 16 GB Ram
GeForce GTX1080 TI 11GB
Windows 10 Pro 64bit