-
Notifications
You must be signed in to change notification settings - Fork 19
Can I participate in development? #78
Comments
Hi and welcome! If you would like to contribute to our LDR Importer, all you need to do it Fork the repo, put your changes on the fork, and create a Pull Request. Your changes sound good so far (some of them I don't quite understand, but I probably will when I test them out! ;) )! |
well, I would like to but I never did anything like that and I do not understand what exactly did you write :) |
Here's a little tutorial that may help you. :) https://guides.github.com/activities/forking/ If you want, you can just paste your updated script in a code box by wrapping it with the |
So I made my fork...now where to put my code part as you were saying above,,hm? Is there some kind of "chat/forum" under my fork where I can paste it? Should I now click PULL REQUEST on right and paste my code there? ...or can I click that "+" creating new file, name it bublible.py and paste there bits of my code? Because as I said my code come in a form of separate Blender addon and not as your updated importer file |
@bublible Here, I think these will help you out. https://guides.github.com/activities/hello-world/#branch https://github.com/le717/LDR-Importer/wiki/Contributing-to-LDR-Importer#getting-started ;) Are your changes a separate script or actually a part of the importer? Going on what you said, it sounds like they were made in Hey, it's no problem you are not sure what to do. This project has a tendency to attract new comers to git. 😉 I recommend reading all those GitHub Guides. They will definitely help you. ;) |
@le717 no, it is separate .py file, addon for Blender that further improves your ldr importer ;) Ah, I am kind of a super lazy person, so basically all I need to know now is WHERE CAN I PASTED MY CODE TO IT TO YOU GUYS? :) Everything else can wait, just to show you what you should add and how...of course only if you decide to do so...so, please tell me just where can I write it for you (I mean those main parts of my code)? So if I understand what is written in the link you give me the only way I see is adding a new TEMPORARY FILE, let's name it bublible.py to the project and there I will put my code so you can check it, right?
|
OH! OK, I'm sorry. I was confused. My bad. We can get your fork set up later. 😉 Go to https://gist.github.com/, paste your code, name the file (give it a .py extension), save it (private Gist simply means only people with the link can view it), and paste the link here. We can see it that way. Hey, that's fine. Python is a easy language to pick up. It's not an issue you are an AS2 scripter already. It doesn't really affect your Python skills (except maybe make it easier to learn since you already know how to "think like a programmer"). |
ok, let's work, ppl... :) |
just a quick question: so should I save it as "Create Secret Gist", right?
|
It really doesn't matter which you do. Since you are pasting the link here in a public comment, people can technically still see a secret gist, but it will not seen in the All Gists feed. Sure, why not. Just drag the two images into the comment box and they will be uploaded. (I messed up the GIF 😛) |
@le717 haha, no problem my friend, here the .jpg for comparison for you BEFORE and AFTER my addon |
Hey, that looks pretty good (including the render)! I'll let @rioforce comment on everything (he's a 3D artist, I'm a programmer :P), but I will say the brick seems looks to be similar to what was added in 92d510f. Did you figure out how to create a Gist? I'd like to see how you performed these actions. :) |
yea, I did, just being working on this pic now, so if you wait a bit more my code is on its way ;) See, I do not know what was or was not added as I was not member of your "LDR Importer clan" :):):) ...therefor I did what I need tomhave not having it in official v1.1.5 that I downloaded Also in my contingent is speckle or grain material for skew parts of sloped bricks but as I said rotation bug did not allow me to rotate replaced bricks as they should be so I commented that part of my code for a while now ;) |
Looks good so far! Can't wait to see the code! :) |
Thanx, here it is + see my comment, and leave yours there let have it everything in one place, please ;)
|
I just looked at your code, and it has some good stuff in it that I might be able to add into the importer as extra options (like the bevel). I am un-sure what the gold replacement does. Does it take all the materials with the color gold and change them to a glossy node setup that resembles real gold instead of just showing the color? About the bevel, I'll see if I can add it as an option in the importer. Not sure though, because beveling can cause a lot of slowness when you have a large model imported. The computer slopes problem has something to do with the original LDraw mesh and how it is importing (something is wrong with the original LDraw brick). I'll look into that as well. :) |
ad colors: in "classic" technique I saw all around everyone is CHANGING MATERIAL ITSELF, what I did is I DO NOT CHANGE MATERIAL, I instead replace only its nodes which is much quicker cos you make it JUST ONCE compared to classic technique which requires looping thru all objects, looking if that object has that material, then removing that material and setting up new...bah, not good, I simply change material DATA on the higher level ;) That said I only change material nodes and that change automatically applies to all objects having that material... ;) So as you may think my new material needs to be defined beforehand in another external .blend file, BUT as I commented in my GIT we could make it build fromscratch inside our code just like you did in your importer with other colors as I saw
P.S.: sorry for all those word mistakes, see I am writing from tiny virtual keyboard on my W8.1 tablet which alone is pretty lame :):):) |
I understand now. I have actually made node setups for the different materials (like gold or rubber for example) and some of them are already in the script, but for some reason the script is not reading those and it uses the default plastic everywhere... |
@rioforce well,,if you point me to that part in your script where it deals with those colors I can look at it myself trying to repair it, if you don't mind? ...and BTW I think I can implement/integrate my code to you importer myself as well...will do it tomorrow, or better said today afternoon,,gotta go sleep now,,gee :):):) |
I think it is on line 180-191 where the material gets applied to the mesh (maybe) and on 413-690 is a list of materials. Here's a link https://github.com/le717/LDR-Importer/blob/master/import_ldraw.py#L413-L690 |
@rioforce OK, will look into it a bit later because today I slept only for 3 hours...but who knows, as I know myself it can be very easily also right now, you know: scorpio sign :) |
now making further improvements and some errors repairings to my code dealing with the color replacement so for a moment DO NOT USE THAT FEATURE ;) |
all problems in my code solved, I will actualize my script shortly here in my GIT file |
I made some stuff as addon for Blender that works in close cooperation with your LDR Importer adding things you didn't add, like automatic seam effect, repairing strange shadowing on sloped computer bricks that happens after your import, replacing nodes of material with nodes of color from external linked file instead of making new material (therefore there is no need to iterate thru all objects searching for a material and then replacing everyone of them, you just replace nodes from the material itself which leads to automatic change in every instance of the material in every object having it that is much quicker and better way), parrenting etc.
So my question is: if you will we can join our efforts and implement my stuff to your LDR Importer...hm?
The text was updated successfully, but these errors were encountered: