Comments (24)
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! ;) )!
from ldr-importer.
well, I would like to but I never did anything like that and I do not understand what exactly did you write :)
Fork?
repo?
Pull request?
See english is not my native language but if you could be so kind and be more specific...I would appriciate it
from ldr-importer.
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 <code></code>
Tags in this box. Hope I could help!
from ldr-importer.
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
from ldr-importer.
@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 import_ldraw.py
. In that case, simply take your version of the import script and overwrite the one already present.
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. ;)
from ldr-importer.
@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?
- warning: actually I am FLASH ActionScript2 guy who can't stand anylonger all that empty wishes and prayers of eurobricks.com ppl for functions they have not in Blender so I becomes angry and frustrated that no one is going to do it for them so I look at Python syntax, its objects, scripting etc. and after like 2 weeks I was able quite easily...well not easily but anyway...to write all they were asking for and now offering this for your importer cos I thought it would be better to have it all in one addon instead of two :):):)
from ldr-importer.
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").
from ldr-importer.
ok, let's work, ppl... :)
from ldr-importer.
just a quick question: so should I save it as "Create Secret Gist", right?
- also, if you will,,I can post picture of BEFORE and AFTER my addon was applied, just tell me where to post those two pics for ya?
from ldr-importer.
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 😛)
from ldr-importer.
@le717 haha, no problem my friend, here the .jpg for comparison for you BEFORE and AFTER my addon
from ldr-importer.
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. :)
from ldr-importer.
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 ;)
from ldr-importer.
Looks good so far! Can't wait to see the code! :)
from ldr-importer.
Thanx, here it is + see my comment, and leave yours there let have it everything in one place, please ;)
- sorry for REPLACE COLOR commenting, it's in slovak,,my native language (I need tomcomment it that way to be able quickly react and not think twice what did I meant with the words :):):))
https://gist.github.com/bublible/cef2df27a5ff2d0d21c2
from ldr-importer.
ad 92d510f: I just see what @rioforce did but it is not enough, you will notice that just by shrinking down some bricks becomes out of line, you deffinitely need to also bevel it, mind you! ;)
from ldr-importer.
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. :)
from ldr-importer.
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
- my gold is really golden, your color or LDraw color, I do mot know wherefrom it comes, is simply a color without any anisotropicity in it, and as I have probably the biggest personal collection of LEGO Space here in Slovakia I have no problem check it accuracy with the real stuff ;)
- having stright look on my render that goldeness is not that visible but still visible compared to oroginal, but if the camera was a bit from angle you would see its metalness grainy golden color as it should be in reality
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 :):):)
from ldr-importer.
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...
from ldr-importer.
@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 :):):)
from ldr-importer.
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
from ldr-importer.
@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 :)
from ldr-importer.
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 ;)
from ldr-importer.
all problems in my code solved, I will actualize my script shortly here in my GIT file
from ldr-importer.
Related Issues (20)
- Install errors on OS X with version 1, 3, 0 HOT 5
- Missing LDraw Search Path on Linux HOT 2
- problem: 'cannot find c:/Ldraw' HOT 3
- ldr-importer does not import all lego blocks HOT 19
- Can't install 1.3.1 HOT 3
- Incorrect Normals / Broken Normals with some random parts/bricks HOT 2
- Unexpected normals when cleanup disabled HOT 1
- Model file contents too short to extract header HOT 7
- 1.3.2 doesn't work - back to 1.2.0 HOT 4
- Using LDR-Importer from python API HOT 2
- "Basic Cleanup" function corrupts LEGO logo in open studs HOT 3
- FBX export is not supporting Cycles nodes HOT 1
- Problem: cannot find Ldraw installation at c:\ HOT 1
- Path's reset of LDraw Parts Library
- Cannot Find LDraw Installation at C:/Ldraw HOT 4
- Doesn't load model
- LDD to LDR, missing pieces, moved pieces HOT 1
- LDD-Importer-Exporter for the future HOT 1
- I can't use this addon
- Traceback call issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldr-importer.