Board index FlightGear Development Scenery

FenceMaker

Questions and discussion about enhancing and populating the FlightGear world.

Re: FenceMaker

Postby sfr » Tue Jun 15, 2021 4:16 pm

merspieler wrote in Tue Jun 15, 2021 4:04 pm:If you are glueless, then nothing would stick :D ... just kidding...

I'd take a look at the .ac file with a text editor... see if the export messed with some orientation.



:-)

the images do show Blender, not flightgear. nothing to do with an exported .ac file. the issue is within Blender itself.
the export of the 'existing Fence object' worked perfectly but not the wall_brick... model i'd like to use.

i did export the 'incorrect fence' also, it appeared in flightgear exactly as it's shown in Blender.
whereas the 'existing fence' object fits perfectly in flightgear.

hopefully another fencemaker user can shed a light on this (and/or try the sample XML i posted earlier)
sfr
 
Posts: 93
Joined: Sun Nov 17, 2019 6:25 pm
Callsign: D-CSFR
Version: 2020.4
OS: Kubuntu 18.04 LTS

Re: FenceMaker

Postby merspieler » Tue Jun 15, 2021 5:50 pm

could you please provide the .ac files, then I'll take a look.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: FenceMaker

Postby sfr » Tue Jun 15, 2021 6:06 pm

merspieler wrote in Tue Jun 15, 2021 5:50 pm:could you please provide the .ac files, then I'll take a look.


the model wall15m-BrickOld.ac is available in terrasync, link
the XML i used.
sfr
 
Posts: 93
Joined: Sun Nov 17, 2019 6:25 pm
Callsign: D-CSFR
Version: 2020.4
OS: Kubuntu 18.04 LTS

Re: FenceMaker

Postby sfr » Sat Jun 19, 2021 11:58 am

i found the reason for the unwanted rotation with an imported object.

the problem was that the imported wall object had a 90 degree rotation defined for X. See Issue #1.
All that's needed is to 'Apply' the rotation by going to Object->Apply->Rotation before running the add-on.
sfr
 
Posts: 93
Joined: Sun Nov 17, 2019 6:25 pm
Callsign: D-CSFR
Version: 2020.4
OS: Kubuntu 18.04 LTS

Re: FenceMaker

Postby Johan G » Sun Jun 20, 2021 4:12 pm

sfr wrote in Sat Jun 19, 2021 11:58 am:All that's needed is to 'Apply' the rotation by going to Object->Apply->Rotation before running the add-on.

While that works too, I usually try avoid doing any scaling or rotations outside object edit mode.
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: FenceMaker

Postby litzi » Thu Jun 24, 2021 7:49 pm

Tried the addon with Blender 2.93. It installes the addon but complains "upgrade to 2.8x required". The fencemaker tools don't show up in the Blender object tab..
litzi
 
Posts: 123
Joined: Sat May 03, 2014 9:59 pm
Location: AT
Version: 2018.3.1
OS: Ubuntu 14.04

Re: FenceMaker

Postby sfr » Thu Jun 24, 2021 8:15 pm

i think you are still using an older version. maybe redownload it here
i uploaded a new version a few days ago, but with minor changes only.
also make sure to remove/rename the older version of the add-on.

to install it in blender 2.93 just copy it to
Code: Select all
.config/blender/2.93/scripts/addons/
and for Blender 2.83 to
Code: Select all
.config/blender/2.83/scripts/addons/


it's working fine in 2.83 (tested & used) and 2.93 (GUI is fine, but wasn't able to use it as i'm travelling right now)
see here with 2.93
sfr
 
Posts: 93
Joined: Sun Nov 17, 2019 6:25 pm
Callsign: D-CSFR
Version: 2020.4
OS: Kubuntu 18.04 LTS

Re: FenceMaker

Postby litzi » Sat Jun 26, 2021 7:53 pm

Thank you very much. I confirm the addon can now be installed. But when I use the 'build' button on any object I get:

File '...../blender/2.93/scripts/addons/object_fencemaker.py', line 162, in inoke
BuildFence(bpy.context.scene.exportpath, obj)
File '...../blender/2.93/scripts/addons/object_fencemaker.py', line 133, in BuildFence
for wpt in tree. getiterator('pole'):
AttributeError 'xml.etree.ElementTree.Element' object has no attribute getiterator

I have tried many combinations of the object being in or outside of a Collection, always the same error.
It's Blender 2.93.1 , my files can be viewed here

https://github.com/litzenbergerm/fg-sce ... nces.blend

https://github.com/litzenbergerm/fg-sce ... -10--1.xml
litzi
 
Posts: 123
Joined: Sat May 03, 2014 9:59 pm
Location: AT
Version: 2018.3.1
OS: Ubuntu 14.04

Re: FenceMaker

Postby sfr » Sat Jun 26, 2021 9:44 pm

i don't have blender 2.93 installed atm so cannot fully test.
i tested your data in blender 2.83 and it worked fine.

this error is due to changes in the version of python shipped with 2.93.

try the changes below:

(if you ask, uh, what shall i do? there are two changes; in line 133 and 135: simply replace getiterator with iter)

@@ -130,9 +130,9 @@
tree = fg_xml.getroot()
poles = []
fences = []
- for wpt in tree.getiterator('pole'):
+ for wpt in tree.iter('pole'):
poles.append (wpt)
- for wpt in tree.getiterator('fence'):
+ for wpt in tree.iter('fence'):
fences.append (wpt)

wpt0 = tree[0][0] # info


good luck, sfr
sfr
 
Posts: 93
Joined: Sun Nov 17, 2019 6:25 pm
Callsign: D-CSFR
Version: 2020.4
OS: Kubuntu 18.04 LTS

Re: FenceMaker

Postby litzi » Sun Jun 27, 2021 8:33 pm

Thanks a lot! I confirm this patch works for 2.93.
litzi
 
Posts: 123
Joined: Sat May 03, 2014 9:59 pm
Location: AT
Version: 2018.3.1
OS: Ubuntu 14.04

Re: FenceMaker

Postby sfr » Wed Jul 14, 2021 8:05 am

hi,

i've converted the script into a flightgear addon and would like people to test it.
you can download it here.

Most obvious changes:

- installs like any other addon, no copying of files needed
- works with the standard UFO
- controlled via Gui: Fencemaker->Fence Options
(no keyboard shortcuts f/CTRL-f atm)
- fence export filename changed to fenceplan-export-HxW.xml
- popup messages instead of console output

any feedback appreciated. i'd like to get it added to FGAddon later on.

bye, sfr
sfr
 
Posts: 93
Joined: Sun Nov 17, 2019 6:25 pm
Callsign: D-CSFR
Version: 2020.4
OS: Kubuntu 18.04 LTS

Re: FenceMaker

Postby merspieler » Wed Jul 14, 2021 8:15 am

Do you still need to do some work in blender with it?

Despite the name, FGAddon currently doesn't provide any addons... only aircraft.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: FenceMaker

Postby sfr » Wed Jul 14, 2021 8:47 am

merspieler wrote in Wed Jul 14, 2021 8:15 am:Do you still need to do some work in blender with it?

Despite the name, FGAddon currently doesn't provide any addons... only aircraft.


sorry, i don't understand. the script(s) work the same as before. create the fenceplan.xml in FG, then use it with the blender addon to actually create the fence/wall object.

well, there's lots of addons available in fgaddon.
i'd like to add it there, even if it only serves as a place to download them from.
sfr
 
Posts: 93
Joined: Sun Nov 17, 2019 6:25 pm
Callsign: D-CSFR
Version: 2020.4
OS: Kubuntu 18.04 LTS

Re: FenceMaker

Postby merspieler » Wed Jul 14, 2021 12:21 pm

sfr wrote in Wed Jul 14, 2021 8:47 am:
merspieler wrote in Wed Jul 14, 2021 8:15 am:Do you still need to do some work in blender with it?

Despite the name, FGAddon currently doesn't provide any addons... only aircraft.


sorry, i don't understand. the script(s) work the same as before. create the fenceplan.xml in FG, then use it with the blender addon to actually create the fence/wall object.


That already answers my questions, thanks... so I still need to use blender.

well, there's lots of addons available in fgaddon.
i'd like to add it there, even if it only serves as a place to download them from.


oh... I didn't know of that... maybe cause it's not on my fgaddon mirror... good to know, thanks
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: FenceMaker

Postby TheEagle » Tue Aug 03, 2021 11:02 pm

Please help quickly: I get following error in Blender:
Code: Select all
Traceback (most recent call last):
  File "/home/frederic/.config/blender/2.83/scripts/addons/object_fencemaker.py", line 162, in invoke
    BuildFence(bpy.context.scene.exportpath, obj)
  File "/home/frederic/.config/blender/2.83/scripts/addons/object_fencemaker.py", line 139, in BuildFence
    Tile = wpt0.find("Tile").text
AttributeError: 'NoneType' object has no attribute 'text'

location: <unknown location>:-

What to do ?
I got the addon from here. please help quickly !

EDIT: This is my fence-markers.xml:
Code: Select all
<?xml version="1.0"?>

<PropertyList>
  <models>
    <model>
      <legend type="string"></legend>
      <heading-deg type="double">0</heading-deg>
      <pitch-deg type="double">0</pitch-deg>
      <roll-deg type="double">0</roll-deg>
      <path type="string">Aircraft/ufo/Models/cursor.ac</path>
      <latitude-deg type="double">51.80206513</latitude-deg>
      <longitude-deg type="double">10.60703961</longitude-deg>
      <elevation-ft type="double">3495.629226</elevation-ft>
      <loaded type="bool">true</loaded>
      <absolute-path type="string">/mnt/DATEN/blender-2.83.0-linux64/2.83/datafiles/colormanagement/filmic/fgdata-2020.4.0/Aircraft/ufo/Models/cursor.ac</absolute-path>
      <stg-path type="string">e010n50/e010n51/3122034.stg</stg-path>
      <stg-heading-deg type="double">0</stg-heading-deg>
      <elevation-m type="double">1065.467788</elevation-m>
      <object-line type="string">OBJECT_SHARED Aircraft/ufo/Models/cursor.ac 10.60703961 51.80206513 1065.4678 0.0 0.0 -0.0</object-line>
    </model>
    <model n="1">
      <legend type="string"></legend>
      <heading-deg type="double">0</heading-deg>
      <pitch-deg type="double">0</pitch-deg>
      <roll-deg type="double">0</roll-deg>
      <path type="string">Aircraft/ufo/Models/cursor.ac</path>
      <latitude-deg type="double">51.80227748</latitude-deg>
      <longitude-deg type="double">10.60733161</longitude-deg>
      <elevation-ft type="double">3496.733407</elevation-ft>
      <loaded type="bool">true</loaded>
      <absolute-path type="string">/mnt/DATEN/blender-2.83.0-linux64/2.83/datafiles/colormanagement/filmic/fgdata-2020.4.0/Aircraft/ufo/Models/cursor.ac</absolute-path>
      <stg-path type="string">e010n50/e010n51/3122034.stg</stg-path>
      <stg-heading-deg type="double">0</stg-heading-deg>
      <elevation-m type="double">1065.804342</elevation-m>
      <object-line type="string">OBJECT_SHARED Aircraft/ufo/Models/cursor.ac 10.60733161 51.80227748 1065.8043 0.0 0.0 -0.0</object-line>
    </model>
    <model n="2">
      <legend type="string"></legend>
      <heading-deg type="double">0</heading-deg>
      <pitch-deg type="double">0</pitch-deg>
      <roll-deg type="double">0</roll-deg>
      <path type="string">Aircraft/ufo/Models/cursor.ac</path>
      <latitude-deg type="double">51.80250795</latitude-deg>
      <longitude-deg type="double">10.60771001</longitude-deg>
      <elevation-ft type="double">3492.72328</elevation-ft>
      <loaded type="bool">true</loaded>
      <absolute-path type="string">/mnt/DATEN/blender-2.83.0-linux64/2.83/datafiles/colormanagement/filmic/fgdata-2020.4.0/Aircraft/ufo/Models/cursor.ac</absolute-path>
      <stg-path type="string">e010n50/e010n51/3122034.stg</stg-path>
      <stg-heading-deg type="double">0</stg-heading-deg>
      <elevation-m type="double">1064.582056</elevation-m>
      <object-line type="string">OBJECT_SHARED Aircraft/ufo/Models/cursor.ac 10.60771001 51.80250795 1064.5821 0.0 0.0 -0.0</object-line>
    </model>
    <model n="3">
      <legend type="string"></legend>
      <heading-deg type="double">0</heading-deg>
      <pitch-deg type="double">0</pitch-deg>
      <roll-deg type="double">0</roll-deg>
      <path type="string">Aircraft/ufo/Models/cursor.ac</path>
      <latitude-deg type="double">51.80237559</latitude-deg>
      <longitude-deg type="double">10.60798379</longitude-deg>
      <elevation-ft type="double">3504.266254</elevation-ft>
      <loaded type="bool">true</loaded>
      <absolute-path type="string">/mnt/DATEN/blender-2.83.0-linux64/2.83/datafiles/colormanagement/filmic/fgdata-2020.4.0/Aircraft/ufo/Models/cursor.ac</absolute-path>
      <stg-path type="string">e010n50/e010n51/3122034.stg</stg-path>
      <stg-heading-deg type="double">0</stg-heading-deg>
      <elevation-m type="double">1068.100354</elevation-m>
      <object-line type="string">OBJECT_SHARED Aircraft/ufo/Models/cursor.ac 10.60798379 51.80237559 1068.1004 0.0 0.0 -0.0</object-line>
    </model>
    <model n="4">
      <legend type="string"></legend>
      <heading-deg type="double">0</heading-deg>
      <pitch-deg type="double">0</pitch-deg>
      <roll-deg type="double">0</roll-deg>
      <path type="string">Aircraft/ufo/Models/cursor.ac</path>
      <latitude-deg type="double">51.80218373</latitude-deg>
      <longitude-deg type="double">10.60834129</longitude-deg>
      <elevation-ft type="double">3519.22833</elevation-ft>
      <loaded type="bool">true</loaded>
      <absolute-path type="string">/mnt/DATEN/blender-2.83.0-linux64/2.83/datafiles/colormanagement/filmic/fgdata-2020.4.0/Aircraft/ufo/Models/cursor.ac</absolute-path>
      <stg-path type="string">e010n50/e010n51/3122034.stg</stg-path>
      <stg-heading-deg type="double">0</stg-heading-deg>
      <elevation-m type="double">1072.660795</elevation-m>
      <object-line type="string">OBJECT_SHARED Aircraft/ufo/Models/cursor.ac 10.60834129 51.80218373 1072.6608 0.0 0.0 -0.0</object-line>
    </model>
[..............]
  </models>
</PropertyList>
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 9 guests