Giter Site home page Giter Site logo

prop2mesh's Introduction

prop2mesh's People

Contributors

brandonsturgeon avatar marchc1 avatar polysteam avatar shadowscion avatar wrefgtzweve avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

prop2mesh's Issues

Can't edit meshes in latest version

Hello,

I am unable to select the mesh controller with context menu and edit the mesh to delete unwanted props/holos. I was able to do this in a previous version but not now.

Also, thank you for making this tool.

[SUGGESTION] Bulk importing of .obj files

I think a great idea would be to have a way of importing a specified folder of .obj files into their own controllers. I like to make P2M cars but my models have a ton of individual meshes. I use individual meshes in their own controllers because it prevents the spiderweb models that sometimes happen with higher quality cars, and so I can individually color and material each part. I would love you forever!

CPPICanTool check inside TOOL:LeftClick might be redundant

if (CPPI and tr.Entity:CPPICanTool(self:GetOwner(), "prop2mesh")) or not CPPI then

As a long time implementer of CPPI for my own prop protection, I haven't ran into any other addon that includes a CPPICanTool check inside of TOOL:LeftClick().

TOOL:LeftClick() already causes (or is preceded by) a gamemode CanTool check. Perhaps my setup isn't kosher, but all other addons I've ran on sandbox server that cater to CPPI have seemingly never needed CPPICanTool inside LeftClick. I think the assumption is whatever prop protection system that implements CPPI is probably also going to be utilizing the gamemode CanTool hook to allow/prevent TOOL:LeftClick() getting called in the first place.

In my case, this is true. Using P2M on worldspawn specifically will be allowed in my CanTool (explicitly returning true), but the redundant CPPICanTool check inside TOOL:LeftClick() will return false because I rely on the initial CanTool check to handle whether a player can use a specific tool on things like worldspawn or not. The CPPICanTool check itself doesn't default to allow worldspawn to always return true.

The tl;dr is that players on my server have to now use P2M on a prop that they own in order to spawn the P2M sent, rather than getting to just click on worldspawn. I'd prefer not to change CPPICanTool to always explicitly return true on worldspawn, but that is what the call inside of TOOL:LeftClick() will require me to do.

If my case sounds too specific or deviated from CPPI's intended implementation, I'd understand if you'd prefer to leave the check in. Otherwise I'd argue, from my current perspective, that it is unnecessary and should be handled by CanTool instead.

Removing a controller while entity was selected caused NULL entity error alongside all entities becoming wireframe

Posting this on behalf of someone else - they were messing with Prop2Mesh, and they deleted a p2m controller while an entity was selected. All non-world entities became wireframe and they began getting the following error in their console.

Player [6][OneEaredNeko] ERR: [prop2mesh] addons/prop2mesh/lua/p2m/editor.lua:97: Tried to use a NULL entity!
  1. LocalToWorld - [C]:-1
   2. v - addons/prop2mesh/lua/p2m/editor.lua:97
    3. unknown - lua/includes/modules/hook.lua:84 (x5)

image

[Suggestion] Render FX and Render Mode

Hello, I recently noticed that p2m cannot use render fx and render mode like vanilla color tool. Please add the ability for meshes to use these drawing functions
image

Visual clipping no longer works

Worked in legacy, doesn't work anymore. Clipping the controller does nothing to the mesh. It ONLY works with the entire legacy addon, not legacy controllers, cause even those don't clip on the new updated addon.

Option to change color, material etc via C-menu

Can't select/add/remove/change color or material of controller with Tool Gun while P2M Entity is parented (because it lacks physbox). Using E2 for this is not easy for everyone. Duplicate those settings in Controller->Settings of C-menu for above actions would be nice.

.

models/wingf0x/ethernetsocket.mdl

Rotates 90 degrees
20201111151940_1

Feature request; per-player triangle limit

Sometimes players import unnecessarily large models for what they're doing, it would be nice to be able to optionally set a total triangle "allowance" per player so that people can't go too crazy.

Attempting to use setMaterial in Starfall errors out

Using setMaterial (such as mEntity:setMaterial(5, nOffMat), where nOffMat = "models/debug/debugwhite" and mEntity is a mesh controller, index 5 being a valid controller) results in a type mismatch for index claiming it expects a string even though in prop2mesh.lua you can tell that "index" is supposed to be a number. It appears to be trying to call Entity:setMaterial rather than p2m:setMaterial.

Scale cannot be set to certain values

I cant get the new controllers to scale anything properly, trying to scale a model down by 0.4500 in settings>meshscale and it will let me enter that in, however after saving it changes to 0.4325

P2M legacy breaks meshes and "hides" controllers

[Prop2Mesh] lua/includes/extensions/table.lua:563: attempt to index field 'val' (a number value)

  1. SortedPairsByMemberValue - lua/includes/extensions/table.lua:563
  2. RemakeTree - lua/prop2mesh/cl_editor.lua:1808
    3. unknown - lua/prop2mesh/cl_editor.lua:1588

image

it's supposed to have 5 controllers. after i meshed a p2m legacy controller, everything broke and i was unable to edit the meshes.
image
idk what to do, as my project can no longer be worked on

prop2mesh e2 option

so there is an option for prop 2 mesh to export the mesh to e2 yet when they do the models dont even spawn why?

Prop2Mesh Models Disappearing

It has happened with base gmod models on a part of my mechs legs but only 4 of them disappear in the same spot on each leg, other parts of the leg share the same model and material but for some reason out of no where my dupe decided to spawn them without anything there, the chip has the models and materials inside of the p2m chip and i tried restarting gmod changing the materials and what not and nothing has fixed the issue. I redid the models and when i confirmed the resize they also disappeared

Garrysmod.2022.06.03.-.19.34.56.05.DVR_Trim.mp4

.

[SUGGESTION] Select by Color

For larger builds mostly utilizing a single material with multiple colors, selecting only one color is a pain to do manually. It'd be nice to have a checkbox similar to select by material, just for colors instead.

[BUG] Most textures don't render

image

Applying most textures to the mesh controller makes it render as solid black. In the image both the plate and the controller have the same texture (vanilla gmod texture, phoenix_storms/wire/pcb_green).

Only a few select textures render properly. From my tests, it seems most textures in the models folder work (such as models/props_pipes/Pipesystem01a_skin3 but not models/flesh). I tested all the sprops textures for example, none of them worked. The meshed props are sprops plates too.

I was told this could be due to hardware incompatibilities, I'm not sure how true that is. If it helps at all, my CPU (integrated graphics) is a Intel® Core™ i5-4300U CPU @ 1.90GHz × 4.

Can't use the P2m E2 library

This is the E2 I'm using to test:

@inputs P2m:entity On  
@outputs  
@persist  
@trigger  
if(~On&On){
#P2m=p2mCreate(entity():pos()+vec(10,0,0),entity():angles(),1,1)
P2m:p2mSetPos(entity():pos()+vec(10,0,0))
P2m:p2mSetAng(entity():angles())
P2m:p2mPushModel("models/led2.mdl",entity():toLocal(vec(30,0,0)),entity():toLocal(ang(0)),vec(1))
P2m:p2mBuild()
P2m:p2mSetParent(entity())
P2m:p2mSetColor(vec(255,50,50))
P2m:p2mSetMaterial("models/proppertextures/acrylic")
}

It throws this error:

sv: Expression 2 (P2m Test): entities/gmod_wire_expression2/core/custom/prop2mesh.lua:313: attempt to get
length of field 'E2P2MResevoir' (a nil value)

This is the lua function, line 311-313 Here

if not Check_Parents(this, target) then
		return
	end

At one point during my experimenting today I did get it to work wiring a p2m entity and pushing models to that. I don't know what I did to make that controller work, but any others I spawned using the tool would only give the error previously stated.
I also can't get the E2 generated controller to receive or build. If I'm just not doing something right, please let me know.

Other than this problem, this is a great addon! Thanks for your work so far!

Certain props move when they're meshed.

When trying to make a mesh with the "models/weapons/w_spade.mdl" model it will create one offset from its meshed position. I don't know if this applies to any other prop.

image
It seems to move it down according to the spades direction every time.

Crash log

Executable: C:\games\steamapps\common\GarrysMod\bin\win64\gmod.exe

-Lua Stack Traces-

Client
0. GetModelMeshes - [C]:-1
1. getVertsFromMDL - addons/prop2mesh-master/lua/prop2mesh/cl_meshlab.lua:322
2. (null) - addons/prop2mesh-master/lua/prop2mesh/cl_meshlab.lua:690

Server
Lua Interface = NULL

MenuSystem
Not in Lua call OR Lua has panicked

Add an option for clients to disable downloading meshes

Like you can disable rendering for custom meshes, an option that lets players select whether they want to download the meshes or not might help with client performance if you already keep rendering off most of the time.

Expression 2: Scaling Multiple Meshes is Unreliable

Whilst exporting and combining several meshes in E2, I noticed that scaling multiple meshes is unreliable.
I exported and combined a total of thirteen meshes. Whilst messing about with MScale, I noticed that some meshes don't scale to the new value of MScale. Only after reloading the E2 numerous times, do all meshes scale to the new value.

After initially spawning the E2, with MScale set to 0.2:
20210101174007_1

After reloading the E2 several times:
20210101173958_1

As you can see, some meshes remain with an MScale value of 1. From experience, the number of meshes affected differ from 1-5.
Messing about with timers in E2 doesn't seem to fix the issue.

Confirming .obj addition from outside the game fails with console error (table expected, got nil)

addons/prop2mesh/lua/entities/gmod_ent_p2m/init.lua:237: bad argument #1 to 'ipairs' (table expected, got nil)
  1. ipairs - [C]:-1
   2. func - addons/prop2mesh/lua/entities/gmod_ent_p2m/init.lua:237
    3. unknown - lua/includes/extensions/net.lua:32

This worked the first time I attempted it using a very basic model I made in blender as a test. I removed the p2m controller and attempted to do the same thing again while figuring things out, and I couldn't add the object because I'd get this error. Attempting to use a different model didn't make a difference.

E2 commands cant set material and color on controller index 7

p2mSetMaterial and p2mSetColor on a p2m controller with the index of 7 (I have 8 in total) cause a script error. Pushing models works fine.
The error: sv: Expression 2 ( E2name ): entities/gmod_wire_expression2/core/custom/prop2mesh.lua:58: attempt to index a number value

need p2m.canCreate() for starfall

need p2m.canCreate() for starfall or some other way to check if a p2m can be created and built. need this to queue spawning of meshes

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.