Skip to content
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

Support Blender 2.7 #5

Open
ProjectBarks opened this issue Jun 4, 2019 · 7 comments
Open

Support Blender 2.7 #5

ProjectBarks opened this issue Jun 4, 2019 · 7 comments

Comments

@ProjectBarks
Copy link
Contributor

The Problem

Currently the project is built for blender 2.8 which uses python 3 instead of version 2. It also means the glTF exporter is not bundled by default. If the demand is high enough or if there is enough residual users of blender 2.79 that could warrant making a 2.79 version.

Execution

To do this we would have to backport python 3 code to version 2 using a library like 3to2. Additionally, the gltf exporter would have to be bundled with our project so the user has the library by default. As long as the library for converting from python 3 to python 2 works the bundling would not be too hard.

Final Thoughts

I think version 2.8 will suffice for but it could be something we decide to approach if the demand is there.

@emackey
Copy link

emackey commented Jun 4, 2019

The bigger issue is the Blender Python API differences between 2.79 and 2.80. A number of features were added, removed, and renamed.

The glTF-Blender-IO project is written to support both versions directly (via if statements), but the Blender maintainers insist on a "clean" 2.80-only version to bundle. So we have a script called convert_to_strict_2.80.py that looks for these specially-formatted if bpy.app.version < (2, 80, 0): statements that maintain cross-version compatibility, and strips them out, leaving only the else clause that is 2.80-specific.

So, the raw code in the GitHub repo works in both 2.79 and 2.80, but produces a number of warnings in 2.80. The converted code has the 2.79 stuff stripped out, and ships as a 2.80-only addon with no warnings.

@emackey
Copy link

emackey commented Jun 4, 2019

2.80 stable is due in July, so this may all be a moot point pretty soon.

Having the repo's raw code work directly in 2.80 is a great help for interactive debugging too.

@ProjectBarks
Copy link
Contributor Author

@emackey My biggest concern is people will want to stick with 2.79 since the UI has been largely changed. Yeah worse case scenario I will try and make a python addon that converts 2.8 code to 2.79 on top of the python 3 to 2.7 converter.

@emackey
Copy link

emackey commented Jun 5, 2019

What I'm suggesting is, rather than invent a new conversion script from scratch, you should take the time to understand what glTF-Blender-IO is doing, and consider doing exactly the same thing, with the same conversion script that already exists. Especially since glTF-Blender-IO is your primary dependency, it makes sense for the structure and conversions to be the same. You could probably also borrow much of the test framework as well, but that's another topic.

@ProjectBarks
Copy link
Contributor Author

Yeah I haven't put too much thought into the approach I want to take. My first thought is just to do a find and replace for the renamed components but now I am remembering I am using some 2.8 only features ie timers.

@mramato
Copy link
Contributor

mramato commented Jun 6, 2019

I agree that we will most likely never support 2.79, but we can leave this open for the time being so people can +1 it if they would like to see it happen. We definitely shouldn't spend any time on it otherwise.

@Ramirez8052
Copy link

Hello,
I'm not a developer but a new user of Blender Cesium.
I would like to use this addon on a regular basis, as it will be very useful in my work. But I have 2 problems.

  1. It doesn't work with Blender version 3.3.
  2. I did the exercise with version 2.80 as indicated on the Cesium website, and it works. However, I can't get my asset in the right place.
    In Cesium ion, when importing, it asks you to set the location, which I did, but it still puts my object in the center of the globe.
    Can you help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants