SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 12-10-24, 11:57 AM   #1
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

Mister_M, Yes it can be done that way. I'm not interested in doing it that way though. And that does not help to Edit existing Harbors.

Thanks to propbeanie I've located the built in move and rotate panel.
I'm not a Blender user so I have to learn things. One thing I've learned is Running a script in Blender. Now that is exactly what I plan to do.
I'll write a script that will do the relocation of objects in Blender in Mass.
The Scripts for 010 will read the needed information then spit out a complete script for Blender.

Jeff-Groves is offline   Reply With Quote
Old 12-11-24, 04:36 PM   #2
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

Got the Script that will move an object and rotate it in degrees figured out.
And a batch import handled.

Now I have to keep studying to figure out how to apply any transforms to objects by name after they are imported.
Still learning the Blender Python APIs

What I want to do is after a batch import, run the script to adjust the objects by name.
So if theres 200 objects they all would be moved and rotated based on what the script provides.

Oh yeah. I can only run Blender 2.79 since I still work with WhinDoz 7
Until I get a New system I could probably load a newer version on SWMBO's WhinDoz 11 contraption.
It's got a Killer Ryzen 7 CPU!

So here's a starter script I run in Blender 2.79 to mass import. I'll be working on that to do any transforms as objects are imported.


Code:
import bpy
import glob
import os    
    
importDir = "E:\\Desktop\\3D\ "
print(importDir)


os.chdir(importDir)
for files in glob.glob("*.obj"):
    print( files )
    bpy.ops.import_scene.obj(filepath=files, filter_glob="*.obj;*.mtl")
That Script imports every object that I exported from the Harbor_Kit.dat!
Now I just have to intercept each object and apply the Transition code stuff as it imports.

Guess I'll have to kind of load a Newer Blender on SWMBO's 'Puter and test it?
Unless a kind person does it for me? You can change the importDir to whatever works for you.

Last edited by Jeff-Groves; 12-11-24 at 06:14 PM.
Jeff-Groves is offline   Reply With Quote
Old 12-11-24, 08:38 PM   #3
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 925
Downloads: 27
Uploads: 0


Default

I hope you know object-oriented programming... it will be useful!
Mister_M is offline   Reply With Quote
Old 12-12-24, 11:39 AM   #4
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

I can program in C, C++, Python, and a few others. So I do know object-oriented programming.


Downloaded Blender 4.3.1 Portable to play on SWMBOs whinedoh 11 Ryzen puter.
I run it off a Portable Thumb Drive. Gotta say it is different.

Last edited by Jeff-Groves; 12-12-24 at 03:41 PM.
Jeff-Groves is offline   Reply With Quote
Old 12-13-24, 04:50 PM   #5
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

Getting real close to doing what I want for Blender.
Time to work on the stuff to grab the info I want from a location.dat and mix that into a Blender script.

Gonna work on doing the Terrain file stuff first as I think it's needed to fill things out.

I also take time to help others with stuff. Looking at Grenso's issue and spent time with Mister_M teaching him a few things.
Jeff-Groves is offline   Reply With Quote
Old 12-13-24, 05:54 PM   #6
s7rikeback
I break things
 
s7rikeback's Avatar
 
Join Date: Jan 2013
Location: Merry Old England
Posts: 782
Downloads: 1153
Uploads: 10


Default

Quote:
Originally Posted by Jeff-Groves View Post
Getting real close to doing what I want for Blender.
Time to work on the stuff to grab the info I want from a location.dat and mix that into a Blender script.

Gonna work on doing the Terrain file stuff first as I think it's needed to fill things out.

I also take time to help others with stuff. Looking at Grenso's issue and spent time with Mister_M teaching him a few things.
Looking forward to seeing how this goes Jeff. This could open up a lot of possibilities with harbor designs and features.
__________________
s7rikeback is offline   Reply With Quote
Old 12-13-24, 06:10 PM   #7
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

Thanks Mate. Just wish I'd have looked at Blender long ago!
The scripting ability is amazing! I put it right up there with 010!


May even remove 3DS Max from my system.
Jeff-Groves is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.