-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blender 2.80 compatibility #18
Comments
I think it would be wise to wait to port to 2.8 until it's out of beta. Unrelated errors present in the beta may make the port far more work than it would be with the stable release. |
what i read since the beta release, there would be no api changes |
API changes are not my concern here.
My concern is unresolved bugs that are present in every beta version of software -- hence being a beta version and not a
release. They have the potential to waste a lot of development time trying to figure out why something in the addon isn't working when it's related to a bug that will be fixed when 2.8 is released.
If you would like to give it a shot, feel free to do so and send a PR; I'll happily do a code review, and I'm sure @friggog will too, considering he is the project's Benevolent Dictator For Life ;)
|
I'd certainly encourage someone to work on 2.8 compatibility if they are keen as it will be needed in the long run, but totally agree that working on third party stuff for beta software is often a bit of a waste of time. This might a good thing for someone new to the project to work on as it requires less intimate knowledge of the plugin itself and more general blender API experience.| The time I can contribute will probably be focussed on #20 as I think this is more important for artists to be able to use the plugin effectively and I'm best placed to do it. The features @luketimothyjones is working on are also more important and a better use of his time than 2.8 compatibility at the minute in my view. |
Pretty detailed info on conversion available here: https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API Should be relatively straightforward as the complex code is pretty well decoupled from Blender and just uses the curve drawing stuff which doesn't seem to have changed. The main effort is in updating the UI to fit with new interface of 2.8 (may not be much to do?) and some of the utilities which do object selection/work with meshes. |
Hi, Blender 2.80 is near to realease, are there news about updating the addon to 2.80? |
Yeah I think it's probably a reasonable time to look at 2.8 compatibility, the built in sapling add-on might provide a basis as to how the UI should work with the redesigned interface. There is probably some significant refactoring required to achieve this, along with the other standard changes from 2.79 to 2.8. I don't have time to work on this now - any contributors welcome! |
Hi again,
I do not know the Python code, I did an Internet search to change some lines in the addon files, mainly in the 2.80 API changes, but at this point I'm lost, maybe you have a little time to solve these problems. Here TreeGen modified to 2.80 |
On line 24 of `parametric/gen.py`, try changing
`stem.curve.bezier_points.add()` to `stem.curve.bezier_points.add(1)`.
I unfortunately do not have a computer in front of me to test the code, and
this is a shot in the dark, but give it a try.
Thanks much for doing the work to convert the GUI code! That's a huge help!
…On Thu, Jul 4, 2019, 6:53 PM Oxer ***@***.***> wrote:
Hi again,
I got taht the addon to appear in UI (with all options visible) and that
the addon mades the tree object but I obtain some errors and the complete
tree is not finished, it stops in the process, these are the errors in
console:
** Generating Tree **
Using seed: 3420778
Making Stems
-> 0 stems made
Traceback (most recent call last):
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/gui.py", line 230, in _construct
parametric.gen.construct(params, scene.seed_input, scene.generate_leaves_input)
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/parametric/gen.py", line 1245, in construct
t.make()
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/parametric/gen.py", line 180, in make
self.create_branches()
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/parametric/gen.py", line 257, in create_branches
self.make_stem(turtle, Stem(0, trunk))
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/parametric/gen.py", line 524, in make_stem
stem.curve.bezier_points.add()
TypeError: SplineBezierPoints.add(): required parameter "count" not specified
Tree generation failed
I do not know the Python code, I did an Internet search to change some
lines in the addon files, mainly in the 2.80 API changes, but at this point
I'm lost, maybe you have a little time to solve these problems.
[image: TreeGen 2 80]
<https://user-images.githubusercontent.com/46649474/60692818-1ab98080-9ed8-11e9-9fc6-c666691d33ca.gif>
*Here TreeGen modified to 2.80*
ch_trees 2.80.zip
<https://github.com/friggog/tree-gen/files/3360836/ch_trees.2.80.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18?email_source=notifications&email_token=ABQGAD6M4WIBAZOMFAOQB43P52SRVA5CNFSM4GJZKCPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZIK6ZQ#issuecomment-508604262>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQGAD4EAJXYKNBRMHADO3LP52SRVANCNFSM4GJZKCPA>
.
|
Yeah awesome work on getting the plugin working as much as you have @Oxervision! The normal workflow would be for you to fork this repo and create a branch for your changes which you can then submit as a PR to a branch in the main repo. This also makes it easier for other to comment on your code as it will be visible to everyone (others can also commit directly to your PR to fix things). I've just created a branch to hold the 2.8 version (I think it's worth retaining the 2.7 version in master for now). If you can do PR to this with your changes that would be amazing! |
Excuse for my ignorance (I'm new in Python and the process in the GitHub) I made some new changes to the addon and the creation of trees work now!! Issues to fix: 1. UV Textures Leafs
2. Render Tree
If you change the camera name to "Camera" and press Render Tree button, it appears this error:
3. Creation LOD
4. Convert to Mesh:
I'll continue testing the settings to see posibble issues. Addon modified to 2.80 with Tree creation working: |
You are a rockstar. Thank you so much for your work.
These errors shouldn't be hard to fix, but like @friggog said, you will
need to fork the codebase and create a pull request.
The first thing you should do is back up all of your changes and save the
zip file to your desktop. After that:
1) Install the GitHub desktop app
2) Follow the instructions here:
https://help.github.com/en/articles/fork-a-repo
…On Fri, Jul 5, 2019, 8:15 AM Oxer ***@***.***> wrote:
Excuse for my ignorance (I'm new in Python and the process in the GitHub)
What is PR? Can you give me a little explanation about the process to
update the addon in GitHub with my changes?
I made some new changes to the addon and the creation of trees work now!!
In some trees like Willow, the creation process is very slow ot Blender
crash perhaps it's to the memory of my computer (iMac mid 2011).
Issues to fix:
*1. UV Textures Leafs*
Making Leaves
-> 4500 leaves made, 0 blossoms made
Traceback (most recent call last):
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/gui.py", line 230, in _construct
parametric.gen.construct(params, scene.seed_input, scene.generate_leaves_input)
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/parametric/gen.py", line 1245, in construct
t.make()
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/parametric/gen.py", line 184, in make
self.create_leaf_mesh()
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/parametric/gen.py", line 324, in create_leaf_mesh
leaves.uv_textures.new("leavesUV")
AttributeError: 'Mesh' object has no attribute 'uv_textures'
*2. Render Tree*
If the camera name in the scene is different to camera, in my case
"Cámara" (I'm a spanish user), and you press Render Tree button, it appers
this error:
Rendering Scene
Could not find camera to capture with
If you change the camera name to "Camera" and press Render Tree button, it
appears this error:
Rendering Scene
Traceback (most recent call last):
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/gui.py", line 293, in execute
utilities.render_tree(context.scene.render_output_path_input)
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/utilities.py", line 300, in render_tree
vec_rot = vec * inv # vec aligned to local axis
TypeError: Element-wise multiplication: not supported between 'Vector' and 'Matrix' types
*3. Creation LOD*
Creating LODs. Blender will appear to crash; be patient.
Traceback (most recent call last):
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/gui.py", line 343, in execute
utilities.generate_lods(context, 3)
File "/Users/Oxer/Library/Application Support/Blender/2.80/scripts/addons/ch_trees/utilities.py", line 151, in generate_lods
temp_mesh = new_curve.to_mesh(bpy.context.view_layer, settings='RENDER', apply_modifiers=False)
TypeError: Object.to_mesh(): takes at most 2 arguments, got 3
LOD creation failed
I'll continue testing the settigs to see posibble issues.
[image: Trees in 2 80]
<https://user-images.githubusercontent.com/46649474/60731180-33ad4a80-9f47-11e9-83a2-08490b8d1f22.jpg>
Addon modified to 2.80 with Tree creation working:
ch_trees.zip
<https://github.com/friggog/tree-gen/files/3363248/ch_trees.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18?email_source=notifications&email_token=ABQGAD33UY6U5ZKWPGZPZTTP55QRTA5CNFSM4GJZKCPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZJYO6I#issuecomment-508790649>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQGAD3ZWFMS5VB6US6SWSLP55QRTANCNFSM4GJZKCPA>
.
|
Add a summary, something like "Initial 2.8 compatibility changes", then hit
"commit" (over on the left-hand side under the list of files). I think the
GitHub app will automatically update the online ("upstream") repository
(called a "push"), but I don't recall, so make sure the online version has
one of the changes you've made.
After that, go to the main page of your forked repository (where you took
your most recent screenshot) and press "New pull request". Submit that, and
you should be good to go.
…On Fri, Jul 5, 2019, 9:54 AM Oxer ***@***.***> wrote:
Ok, I'm in this point:
*1.* I installed GitHub Desktop Mac.
*2.* I forked tree-gen repo.
[image: Repo Forked]
<https://user-images.githubusercontent.com/46649474/60735964-a6252700-9f55-11e9-9db5-d041db2aab91.jpg>
*3.* I cloned the repo to my computer.
*4.* I changed the files with the new API
[image: Files changed]
<https://user-images.githubusercontent.com/46649474/60735931-7c6c0000-9f55-11e9-8d06-5b6f3a31d060.jpg>
What's the the next step?
Or I did something wrong
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18?email_source=notifications&email_token=ABQGAD6FCRVNUOCWIGW7D3DP554FRA5CNFSM4GJZKCPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZJ6OHA#issuecomment-508815132>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQGAD7O6ZQDCA5L63IUQRDP554FRANCNFSM4GJZKCPA>
.
|
Whoops, hold on, there's an existing pull request |
Ok, Thanks for the info!! |
I did the pull request, should not I have done it? |
Alright, in your GitHub app press "Push" on the right-hand side at the top. That will upload your changes to GitHub. I left out a vital step (setting the target branch) but we'll deal with that later. |
Done, the files were updated in my forked Oxervision/tree-generator repo. |
Don't worry about it, my fault. A classic example that I should never use Git before my morning coffee. Wonderful! I'll review your changes and will get started fixing the more vital bugs sometime today. |
:) I don't like the coffee, I usually drink cocoa with milk in my breasfast, but here in Spain It's snack time, 19:26 PM. |
Ah, cocoa with milk sounds like a lovely way to start the day! I am a hopeless caffeine addict unfortunately, so I am pretty groggy until I have had my coffee. With that said, over here in America we are (generally speaking) fairly uncreative when it comes to morning beverages. Coffee, orange juice, milk, and/or tea are what the majority of Americans drink in the morning. |
Enjoyed the wholesome exchange above ;) Have merged #33 with the initial work from @Oxervision (thanks!), it sounds as though there is still a significant number of fixes that need to be made as a result of the blender API changes relating to mesh and curve operations. Are you planning to work on this @luketimothyjones? I think it should be fairly easy and am happy to take a look, though it will probably be a while before I can find the time too. Issues:
|
I would very much like to do so, but have recently returned to college (uni) to finish my degree, so my time has yet again become a scarce commodity. This unfortunately means that I'm in a similar situation as you; I would love to, but it will be a while before I can. I might be able to sneak some work in here and there, but that's a generous use of "might" in the immediate future. |
Ok no worries, good luck with uni! I’ll hopefully have some spare time in a few weeks - if you do do anything make sure to do a PR (even if incomplete) so I can easily work on top of your changes |
Had an hour train ride this morning so started fixing things: da3e18f. Some of these changes should be propagated to the 2.79 version (e.g. correct camera selection and the way objects are accessed possibly). One big issue I'm having is a fairly regular segfault when generating trees - can't see any obvious reason and debugging isn't as straightforward as most of the other issues. Also when generating a tree the operators should work straight away, at the minute you need to manually select the tree. We just need to make sure the generated tree is selected properly at the end of generation. |
ebda1d6 should fix the utilities (I think). I was having some weird bug hiding the LODs which I think might just be because I had an out of date build - currently downloading the release version to test (taking ages because the blender site is wrecked). Still getting segfaults (will see what happens on the release build) |
The way that classes are registered has changed. Additionally, properties use type annotations now.
The class registration should be easy, and type annotations shouldn't be too bad, either. There will inevitably be other things that break.
Let's keep track of progress here.
The text was updated successfully, but these errors were encountered: