Code Monkey home page Code Monkey logo

sourceops's People

Contributors

bonjorno7 avatar cryptalchemy avatar jonasalmaas avatar liondoge avatar loaerile avatar mcgravel avatar peakks avatar xchellx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sourceops's Issues

QC support

as SourceOps generates QC file.
you need to support all qc commands ๐Ÿ˜ฎ
or add option for custom commands to qc file

Difference between SourceOps and SourceIO?

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:

  • Blender Source Tools + Crowbar
  • SourceIO
  • SourceOps

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.

Add $texturegroup support

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.

Error Installing in Linux

Direct installing 0.5.2.8 or later versions on Linux cause issues with import ctypes.wintypes
Screenshot from 2021-04-01 15-30-43

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.

Always use forward slashes

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.

LOD support?

Heyo

Wondering if there are plans to support exporting LODs from sourceops? Would be very useful to have

Thanks!

FBX to MDL

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).

Scaling issues with prop_dynamic

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

FBX issue with $origin

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.

Parenting doesn't work

It should apply transformations of parents, unless it shouldn't, because animation.. I don't know, it's complicated

Make $staticprop a checkbox

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.

Poor error reporting when textures aren't found

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.

Unicode decode error can occur from path(s) with "\x" in them, subprocess still uses backslashes

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:
image
Debugging seems to indicate that Popen makes the path with backslashes, even though the args variable appears to use forward ones as input?

image

subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

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)

cannot export vmf

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

Texture scaling

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

Paint alpha from texture

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.

I have a problem when I try to export my model.

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'

installation problem

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.

Screenshot: br_blender_base

(https://ibb.co/0qxWn5v)

UI support for compiling models from FBX (CSGO)

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.

Documentation was written back when 0.5.2.0 was the latest version, is now outdated

The wiki page for SourceOps was written mostly in 2020. Since then, many options have been changed.

Games

  • "Display Name" is now "Name"
  • "Gameinfo Path" is now "Game" - For mods, should this be the mod's gameinfo.txt or the SDK's gameinfo.txt?
  • "Additional path" is now "Models"
  • "Maps Path" is now "Mapsrc"
  • "Bin", "ModelSrc", and "Mesh Type" are new

Models

  • "Display Name" was removed
  • "Model Name" is now "Name"
  • "Armature" is new
  • "Bodygroups" and "Stacking" are not mentioned

Model Options

  • "Static Prop Combine", "Collision Joints", "Prepend Armature", and "Origin Source" are new
  • The "Origin XYZ" settings changed names and Z is now implied to be in the direction of positive Z
  • "Rotation" is now "Origin Rotation"

Material (Folders)

  • "Folder Path" is now "Relative Path"
  • "VMT Name" is now "Materials"

Sequence(s)

  • "Sequence Name" is now "Name"
  • "Action" is new. The entire concept of actions was mentioned as a feature to be implemented in the future in that one video, and now it is implemented.
  • "Framerate Override" is now "Custom Framerate"
  • "Custom Range" is new

Event(s)

  • "Display Name" is now "Name"
  • "Frame" is now "Start Frame"
  • "Value" is now "Event Value"

Attachments

  • Is new

Maps

  • Referred to as "Displacements" on the wiki
  • "Map Name" is now "Name"
  • "Brushes" and "Displacements" are referred to as "Collection"
  • "Brush Scale" is now "Texture Scale"?
  • "Allow Skewed Textures" is new

Simulation

  • Has a screenshot, but no writing for it

Exporting/Compiling Models

  • Blender no longer has a built-in text editor(?)
  • At one point, "mld" was written instead of "mdl"

VTF file export

using the textures that are inside the blender project would be useful instead of having to open vtfedit.

Model Compiling to Desired Directory

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.

Unused vertex groups cause error

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.

Support for Non Linear Animation

image
spin get exported
fl_susp will not get exported
fr_susp will not get exported
rl_susp will not get exported
rr_susp will not get exported

smd compile errors

`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`

Add a button to open a VMT file

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.

Support Static Prop Combine

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.