bonjorno7 / sourceops Goto Github PK
View Code? Open in Web Editor NEWA more convenient alternative to Blender Source Tools.
License: GNU General Public License v3.0
A more convenient alternative to Blender Source Tools.
License: GNU General Public License v3.0
Just a slight typo, doesn't appear in the README's screenshot so it doesn't look like it'll cause any end-user confusion
https://github.com/bonjorno7/blender_source_extras/blob/b677f81b057752a19e0fca43a2384f0a3e0129b0/qc_generator.py#L43
Instead of being treated as an empty string, which messes up the smd file.
as SourceOps generates QC file.
you need to support all qc commands ๐ฎ
or add option for custom commands to qc file
Default for bmesh triangulate is beature for quads and ngons, but it should be fixed and clip
Hi, sometime in the future, I'm planning to do a guide on how to import SFM models into Blender.
I want the readers to be able to know the strengths, weaknesses and purposes of each of the following tools:
I hope you don't mind describing these tools in the way you see them so that new Blender users will know what to expect with each tool.
I usually post guides/tutorials HERE and HERE.
Thank you.
Perhaps as UIList where you can add items, each of which will have a blender material and a string input? But then what of multiple materials on one line? I don't know.
Direct installing 0.5.2.8
or later versions on Linux cause issues with import ctypes.wintypes
I used as workaround two options:
First install the
0.5.2.6
, enable it, then upgrade to last version; Blender don't check this import after enabled;
or
Just comment the addon
./addon/utils/common.py
line 5 then install normally.
smd.py#L34 ๐ข
it doesnt allow to use weapon_bone
, because it become Armature.weapon_bone
.
This is so that blend files and qc files can be cross platform.
It matters because $texturegroup cares which slash is used in the smd file.
every bpy.props thing in every blender class (so everywhere except scene.BASE in the register function in __init__.py) should use : instead of =
Apparently steamapps/common/YourGame/bin/bin
is a valid path.
It should be steamapps/common/YourGame/yourgame/gameinfo.txt
.
Heyo
Wondering if there are plans to support exporting LODs from sourceops? Would be very useful to have
Thanks!
This would be bool + int property, so you can make the sequence use a specific framerate.
I think this should add its transforms to the $origin and $scale in the QC
Im just trying to convert an fbx file to mdl to use in PAC3, how would I do this? I have watched the tutorial but it is outdated and uses animations w/ bones (neither of which im using or want to use).
When making a prop_dynamic there are various situations where the modelscale in hammer will not multiply the scale but instead use the number as a power, however only applied to the visible mesh, the collision will be accurate. Simply creating a cube, parenting an armature to it, and not modifying it any way and exporting it will create this bug. Exporting the same model in blender source tools and compiling with crowbar does not produce this bug, it seems to only exist within sourceops. image
When using FBX for $body (probably $model too, haven't tested), $collision no longer uses $origin.
I have no idea how to fix this, but I wanted to document it anyway.
It should apply transformations of parents, unless it shouldn't, because animation.. I don't know, it's complicated
Probably make it off by default. Apparently it can cause crashes, that's why it shouldn't be set automatically but instead decided by the user through UI.
When the SMD exporter can't find a material it's looking for, it just replaces it with a non-existent material named "no_material". It should immediately halt and print the path of where it tried to look.
I was thinking with the built in text editor, since it's platform agnostic.
Below Body Groups.
This is used for $model stacking.
Reposting comment from closed PR #70
It appears that if a path has \x
in it, it is interpreted as a Unicode escape character instead of a path:
Debugging seems to indicate that Popen
makes the path with backslashes, even though the args
variable appears to use forward ones as input?
SourceOps/addon/types/model_export/model.py
Line 313 in bbc8838
More info on what is happening on Windows: https://docs.python.org/3/library/subprocess.html#converting-argument-sequence
Originally posted by @CabbageMcGravel in #70 (comment)
ref.smd would be the name of the collection going into ref and etc.
support goldsrc ?
I have no idea how to do this :/
i try to port a roblox map to gmod but i get this error
Python: Traceback (most recent call last):
File "C:\Users\Pop4484\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_scene_valvesource\GUI.py", line 84, in draw
row.label(text=GetCustomPropName(scene.vs,"export_format",":"))
File "C:\Users\Pop4484\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\io_scene_valvesource\utils.py", line 302, in GetCustomPropName
return "".join([pgettext(typing.get_type_hints(type(data))[prop][1]['name']), suffix])
TypeError: '_PropertyDeferred' object is not subscriptable
location: :-1
Hi, I'm creating a map for CS:S in Blender and using your add-on to export it into Hammer. Thanks a lot for making this!:)
The issue is that if I want to keep things as brushes, I need to re-scale and shift all textures in Hammer each time I export it from Blender. I'm not sure how texture UVs work in Source yet, but I wonder if there is a way to use Blender UVs to create the brush texture data in a way that makes brushes look the same as in Blender.
I was planning to write a script or to modify your add-on for personal use to solve this for my workflow, but then I thought "hey, maybe this was already solved by bonjorno7 and I didn't realize".
Does this make sense or am I missing something? Should I work on your code to create a PR if I figure this out, or are you not interested in this at all?
Thanks
Hey, here's a suggestion. The very old DispGen has a feature where you can give it an alpha mask and it paints blend alpha onto each vert. Since DispGen crashes when you use this, a sops version would be great.
For example, say you make some terrain in WorldMachine and export a heightmap and a mask, where black is grass and white is rock. You feed these in, and the result is a mountain with a rock texture on the sides and grass on the top and bottom.
An even cooler version would support splatmaps and 4way blends, where you have an RGBA texture (the splatmap), where the value of each channel represents one texture in a 4way blend. You feed this in and get a mountain with dirt, rock, grass, and snow all blending together.
Give me a shout on discord at 9yz#5386 if you have any questions.
Seth insists
I have no idea how to do this :/
Python: Traceback (most recent call last):
File "C:\Users\super\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\SourceOps\addon\ops\export_meshes.py", line 31, in invoke
error = source_model.export_meshes()
File "C:\Users\super\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\SourceOps\addon\types\model_export\model.py", line 76, in export_meshes
self.export_anim(self.armature, None, self.directory.joinpath('anims', 'idle.SMD'))
File "C:\Users\super\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\SourceOps\addon\types\model_export\model.py", line 106, in export_anim
self.export_smd(armature, [], action, path)
File "C:\Users\super\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\SourceOps\addon\types\model_export\model.py", line 123, in export_smd
smd.from_blender(armature, objects, action)
File "C:\Users\super\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\SourceOps\addon\types\model_export\smd.py", line 427, in from_blender
self.lookup.from_blender(armature)
File "C:\Users\super\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\SourceOps\addon\types\model_export\smd.py", line 30, in from_blender
for bone in armature.data.bones:
AttributeError: 'Mesh' object has no attribute 'bones'
Greetings,
I would like to use your addon but I get an error during the instalation, tried (Win7, 64bit) Blender 2.8 and 2.79b, same error for both of them.
This addon can be used to export playermodels?
Currently to my knowledge, there is no simple button method for compiling a model from FBX for CSGO (for the purposes of having a 2nd UV), this would be an incredible feature and would to my knowledge make other methods of compiling models obsolete.
The wiki page for SourceOps was written mostly in 2020. Since then, many options have been changed.
Games
Models
Model Options
Material (Folders)
Sequence(s)
Event(s)
Attachments
Maps
Simulation
Exporting/Compiling Models
using the textures that are inside the blender project would be useful instead of having to open vtfedit.
So you don't have to do it manually when using someone else's blend file.
I can't stop people from using it, so I should just support it properly like I used to
To compile models to a directroy which doesn't have any native source files, the model should be copied / compiled to the directory set.
Maybe have a base game (CSGO), then have another game config (Custom Map Assets) use everything from the base game besides the model compiling directory.
If there's no corresponding bone, it should probably report this to the user, but not crash. So I need to make it check whether the name is in the bone dictionary and if it isn't, send a warning. Atm it just assumes that it's in, causing a crash.
Kinda sus
Just use bpy.path.abspath()
`Python: Traceback (most recent call last):
File "C:\Users\flyin\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SourceOps\addon\ops\export_auto.py", line 56, in invoke
return self.execute(context)
File "C:\Users\flyin\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SourceOps\addon\ops\export_auto.py", line 76, in execute
error = self.export(game, model)
File "C:\Users\flyin\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SourceOps\addon\ops\export_auto.py", line 89, in export
error = source_model.export_meshes()
File "C:\Users\flyin\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SourceOps\addon\types\model_export\model.py", line 73, in export_meshes
self.export_anim(self.armature, None, self.directory.joinpath('anims', 'idle.SMD'))
File "C:\Users\flyin\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SourceOps\addon\types\model_export\model.py", line 103, in export_anim
self.export_smd(armature, [], action, path)
File "C:\Users\flyin\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SourceOps\addon\types\model_export\model.py", line 122, in export_smd
smd.from_blender(armature, objects, action)
File "C:\Users\flyin\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SourceOps\addon\types\model_export\smd.py", line 427, in from_blender
self.lookup.from_blender(armature)
File "C:\Users\flyin\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\SourceOps\addon\types\model_export\smd.py", line 30, in from_blender
for bone in armature.data.bones:
AttributeError: 'Mesh' object has no attribute 'bones'
location: :-1`
Perhaps select your blender material whose name is the path to your VMT relative to the materials folder, and then you can edit it or whatever.
https://www.mapcore.org/articles/tutorials/static-prop-combine-in-csgo-r111/
What needs to be done is each model should have a checkbox called Static Prop Combine (mention in the tooltip that it's CS:GO only).
When enabled, the modelsrc files should go in /steamapps/common/content/csgo/models/
instead of the game's modelsrc folder.
Also, the folder structure needs to be a little different, because the QC needs to be up a folder, meaning no more subfolders per model. Same structure as the compiled model files.
The QC also must be compiled from this new location, because Valve lol.
A second thing to do would be to generate the spcombinerules.txt
, but I'm not sure how.
like attach empty object to bone, and export as attachment
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.