Board index FlightGear Development Scenery

FGBlenderTools - FlightGear Development Tools (Blender)

Questions and discussion about enhancing and populating the FlightGear world.

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Tue Feb 25, 2020 7:01 pm

Good luck with your project. The tool needs more testing, so if you run into problems, please let me know.

Scott
xDraconian
 
Posts: 302
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby legoboyvdlp » Wed Mar 25, 2020 6:20 pm

I have not been able to install it despite following the instructions - pip reports pyshp is up to date, yet I get a warning that the script cannot find the module "shapefile", preventing installation of the tools?


Ok - I forgot to copy them to Blender's copy of Python - trying that now.

And that worked. Perhaps it was an omission in the README file - I had to go to the first post - or I didn't look close enough?
User avatar
legoboyvdlp
 
Posts: 7413
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: next
OS: Windows 10 HP

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Wed Mar 25, 2020 6:41 pm

I'll check the readme. I thought I had included that copy step, but I may have omitted it.
xDraconian
 
Posts: 302
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby legoboyvdlp » Wed Mar 25, 2020 6:55 pm

At the moment I am trying to load a .btg file to edit the boundaries of an airport so aprons are not flooded.

The script generates an error that when

Code: Select all
bl_mat.diffuse_color = self.color


"sequences of dimension 0 should contain 3 values, not 4"

Shall I upload the .btg file?

This is odd, because a google search shows the most likely error is in fact "ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3" rather than the inverse, 3 values not 4, which I got.
User avatar
legoboyvdlp
 
Posts: 7413
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: next
OS: Windows 10 HP

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Wed Mar 25, 2020 10:29 pm

Make certain you are using the correct version.

master branch = Blender 2.80+
There is a separate Blender 2.79 branch, but I'm not going to maintain it, so best to use Blender 2.80 or higher.

Color values in Blender 2.80 require 4 values - red, green, blue, alpha. Three values were utilized in Blender 2.79. Seems you have a mismatch between Blender and the script versions.
xDraconian
 
Posts: 302
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Wed Mar 25, 2020 10:46 pm

legoboyvdlp wrote in Wed Mar 25, 2020 6:20 pm:Perhaps it was an omission in the README file - I had to go to the first post - or I didn't look close enough?

I believe you are using the 2.79 version. The instructions for Blender 2.80 were revised and the copy of scripts into the Blender folder should no longer be necessary with the new instructions.
xDraconian
 
Posts: 302
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby legoboyvdlp » Wed Mar 25, 2020 11:08 pm

Hi,
I got the latest release from your sourceforge, and your "readme" file specifically mentioned 2.80. If you could tell me where I could find the very latest however, I will be glad to try that.
User avatar
legoboyvdlp
 
Posts: 7413
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: next
OS: Windows 10 HP

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Alant » Thu Mar 26, 2020 11:31 am

I install these tools using a cmd shell (or windows power shell) open at the directory C:\Program Files\Blender Foundation\Blender 2.82\2.82\python\bin .
The commands I use are:-
./python -m pip install -U pip
./python -m pip install -U setuptools
./python -m pip install -U cython
./python -m pip install -U pyshp
./python -m pip install -U pyproj
Doing it this way uses Blender´s own version of python.
Using the latest version by git from git://git.code.sf.net/p/xdraconian-fgscenery/code, I then copy the files io_scene_flightgear and io_scene_flightgear_import to directory C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons.
Done
Alan
Alant
 
Posts: 941
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby legoboyvdlp » Thu Mar 26, 2020 11:42 am

Ok - I have got the git version - will check that out.


The repository is very large - a shallow clone with --depth=1 took about six seconds while my original clone was going over 450Mb when I quit it, thinking a Blender script could not be so large...?
User avatar
legoboyvdlp
 
Posts: 7413
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: next
OS: Windows 10 HP

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Johan G » Thu Mar 26, 2020 1:18 pm

A bit off topic

legoboyvdlp wrote in Thu Mar 26, 2020 11:42 am:The repository is very large [...] my original clone was going over 450Mb when I quit it, thinking a Blender script could not be so large...?

Every single commit add up. I have not really thought about it that way, but would guess some GIT workflows would be more efficient when it comes to repository size. I am absolutely no expert on on git and it was some time since I last used it, but I have seen people blog about the benefits of rebase over merge, though not in relation to repository size.

In essence, AFAIUI,* the argument is that while it is convenient to be able to see every commit while working on a feature or bug fix branch, the main branch would get a too detailed commit history to sift through if you merge them as they are. The idea is that you would have a more meaningful commit history if you would instead use interactive rebase and squish related commits together. It is not like that there really is a need to preserve spelling corrections and the like as separate commits in the history of the main branch. ;)

As always if there is pros, there is also cons. The big one is that you would be rewriting history, with the possibility to mess up commits.

I think these might be helpful (though it is only some of many perspectives):
____
* As far as I understand it
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5636
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby wkitty42 » Thu Mar 26, 2020 1:21 pm

something else that can make git repos get very large very fast is committing binary files... git doesn't/can't diff binaries so the entire new binary blob is sent each time...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6154
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Alant » Thu Mar 26, 2020 1:26 pm

In this case, if I remember correctly, Scott was working on Hawai scenery, and his scenery work files were in the repo. Every time the scenery was rebuilt the repo size went up by a large amount.......
A shallow clone omits that historical stuff.
Alan
Alant
 
Posts: 941
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby legoboyvdlp » Thu Mar 26, 2020 1:49 pm

It still occurs - I am using 2.80 and I have installed the correct version...

The same thing occurs with the importer which claims to be for 2.80 from Leto's repository.
User avatar
legoboyvdlp
 
Posts: 7413
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: next
OS: Windows 10 HP

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Johan G » Thu Mar 26, 2020 2:11 pm

wkitty42 wrote in Thu Mar 26, 2020 1:21 pm:[...] git doesn't/can't diff binaries so the entire new binary blob is sent each time...

Alant wrote in Thu Mar 26, 2020 1:26 pm:[...] if I remember correctly, Scott was working on Hawai scenery, and his scenery work files were in the repo. Every time the scenery was rebuilt the repo size went up by a large amount.......

Oh. Looking at the older commits there were indeed a lot of binary files.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5636
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby legoboyvdlp » Thu Mar 26, 2020 3:49 pm

Either Blender's Python installation was corrupted, or 2.80 is not supported - I am now on 2.82 with a "clean" Blender, and everything - apart from installing your AC3D importer - worked.

Leto's AC3D importer worked.

Image

Image

Image


I tried importing an airport and .btg together:

Image

:lol:



Is there anything special I need to do to export .btg? Because, it seems like it is failing silently, the .btg file is not changed.
User avatar
legoboyvdlp
 
Posts: 7413
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: next
OS: Windows 10 HP

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: Applebot [Bot], www2 and 2 guests