-
Notifications
You must be signed in to change notification settings - Fork 19
[Discussion] Script Rewrite for v2.0 #35
Comments
Sounds like a good idea! I'd much rather have Banbury lead, as I still can't quite wrap my head around this thing. (Python's lack of static types can actually be a pain at times) |
I have no plans to rewrite the importer for the time being, since it works well enough for me. Currently I'm playing with the new 2D features of Unity3D. As a starting point I would suggest to move the parsing of the DAT files into its own class. The data could be stored in a dictionary. A second class would then take this dictionary and build a model from it. That would make the whole thing much easier to read. The whole material stuff could also have its own class. The script is already getting rather large. So splitting it into multiple files would also be a good idea. |
Well in that case, I'll try doing what you said as soon as I get a few more core features implemented in https://github.com/Tribex/RapidS |
Alright, sounds like a plan! Banbury, will you make a diagram of what you suggested on the wiki? That will help us when we are coding. 😉 That's fine, Tribex. I probably won't start working on it this week either (Christmas is this week after all), but I will go ahead and make the branch for the changes and update the aforementioned issues for the v1.3 milestone. |
Umm, no? I don't want to be a dick here, but drawing diagrams is what I'm doing at work and currently I'm on vacation. |
@le717 I'll attempt to make a diagram, if I can understand it. Just finished the last major thing for RapidS 0.1. (Documentation) >_> Where is the wiki document? I can probably find it. |
@Banbury No no, I understand. I wouldn't want to do what I do every day for work on vacation either. It's all good. 😉 @tribex Right under the pull request button at the right of the page is a book icon. That is the wiki. It can also be accessed from https://github.com/le717/LDR-Importer/wiki. Put it somewhere under Developer Area.
Good idea, but not completely possible. Blender has a requirement that all addons have an |
@le717 I'll try to come up with a good system/diagram, currently down with a cold. We could do multiple files the same way as we do the configuration. With fake includes. |
It's perfectly possible to split the script into multiple files and/or packages. The Blender way to do this is to move the bl_info into the _init.py. |
Before I forget. Please create a new branch for the rewrite. This will be a lot of work and maybe we still want to do fixes for the old version, before the new version is ready. |
New branch already created. I had already thought of that when I created the issue. ;) https://github.com/le717/LDR-Importer/tree/rewrite :O Looks like I have some reading to do! Thanks! Although loading from sub folders would still be nice... @tribex Oh no! D: Hope you feel better soon! Merry Christmas, everyone. 😃 |
Thanks :) Merry Christmas! :D |
An example of why this is needed is in #39 |
Don't worry Tribex, we have already firmly established reasons for the rewrite. 😉 I may have time to work on it soon, but we need that diagram first so we know how to proceed. |
RIght, but how do we make a diagram if we don't know how to proceed? I have a few ideas, but they're not very solid yet. |
Quote Banbury:
Banbury, you want to add to this? |
Ah, okay. I'll hopefuly start this afternoon... Depending on how late I'm actually out. |
If I would do the rewrite, I would start by writing a generic LDraw parser class, that stores the whole model in some Python structure (either a dictionary or a class tree). Then I'd write a class that reads this data structure and creates a model from it. Basic enough. The devil is of course in the details 😄. PS: I'm currently preparing the release of a Unity 3D addon. So I'm rather occupied right now. |
What does the addon do? Also, no diagram today... And my schedule is unfortunately getting much busier for the foreseeable future. :C |
http://vimeo.com/82824100 I'm not finished uploading yet. Any discussion should happen there. |
What exactly does that do to Unity? Make your desktop literally 3D? BTW, vimeo is blocked in my country. |
I'm talking about Unity 3D, the game engine. |
Oh sorry, I thought you meant the Ubuntu Unity 3D. |
Simply making a note here. http://www.blender.org/documentation/blender_python_api_2_69_9/bpy.types.AddonPreferences.html We might be able to use this for the preferences system instead. |
Quote @Banbury
And quote @tribex
As it has been established, the script needs a rewrite very badly. I think it needs to be done ASAP to not only fix any bugs present but to also make any new development much easier. Yes, it is Christmas time so we won't have too much time to work on it right now, but release milestones do not have deadlines until after they are released, so there is not a huge rush. By doing it now rather, we will have less new code to salvage and features to restore from the old version.
I know we already have issues assigned to
v1.2v2.0, but I propose to push these back to v1.3, and letv1.2v2.0 be the rewrite. We would not have to add new features, a rewrite should be enough to warrant a new release (and it may overall be faster when it is all said and done).We can work out all the details later (I've enabled the wiki for us to put the plan on), but I propose Banbury take the lead (as he identified the need for a rewrite), and by lead I mean lay out the new script structure and guidelines we should implement and follow. Obviously this is a team project so ideas/concerns can be expressed and added, but we still need someone to oversee the operations.:wink:
We would more than likely make a branch off
master
(I'll call itrewrite
in this issue) to hold the new changes. If it is possible (and I know it is), we'll branch off that branch to work on our our assignments, and those would be merged back intorewrite
. When the script is complete,rewrite
will be merged back intomaster
.Like I said, all details can be worked out, This is simply a proposition to proceed with the rewrite before too many new features (such as implementing the Cycles LEGO Materials @rioforce actually created for us) are added, making it harder to redo.
Are there any questions, concerns, comments or something I need to clarify? Do you think we should go ahead with this?
The text was updated successfully, but these errors were encountered: