Jump to content

Mesh Enabled Scripts


Pedlar Decosta
 Share

You are about to reply to a thread that has been inactive for 2326 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Where can I get information about making mesh prims script enabled ? With some meshes my scripts work and others they don't. The script seeks to alter some of the parameters of the prims via color/texture/tex repeats etc. Not shapes, scale or position. ...although I could look at that in the future if it is possible...

Link to comment
Share on other sites

4 hours ago, Pedlar Decosta said:

Where can I get information about making mesh prims script enabled

To be honest, you can't...

Because there is NO SUCH THING as a 'script enabled mesh prim' or a 'script disabled mesh prim'.

If a piece of mesh is modifiable, you can add a script to it, and if the script is written correctly, it will change colours, textures offsets and scaling on the whole mesh piece or on a single 'materials face' of same if it was made with more than one face, just like a regular rezzed in-world plywood prim. NO DAMN DIFFERENCE.
 

  • Like 2
Link to comment
Share on other sites

Klytyna is quite right.  There's nothing special about mesh as far as scripts are concerned.  Ordinary prims are mesh too. But scripts can't do magic on objects that they weren't written for.  If the script you wrote is supposed to change the color on face #3 and your mesh object doesn't have a face #3, for example, that might explain things.  Or if you want to apply a texture to a surface without knowing a thing about its UV mapping ....

Link to comment
Share on other sites

As I said, that's what I thought. I have just been checking and there is a mesh prim that I can't get to respond. Even with a script that returns the face number on touch. And I had read something somewhere about script enabling Mesh. So I thought I'd ask the experts. I didn't expect the tone of the reply. But hey. That's life. I asked because I do not know a lot about mesh. This particular mesh prim remains a mystery and I have no idea why. I have scripted mesh before with no problems.

  • Like 1
Link to comment
Share on other sites

There are 4 scenarios I can think of that might cause your script to simply not work:

1. You don't have modify rights to the target object.
2. The target object is sitting on a scripting-disabled parcel.
3. The script itself has been set to not-running, or has crashed and needs to be reset.
4. The script actually is running, but might be written in such a way that isn't flexible enough to work with your particular target object.

The first case is pretty self explanatory, and you'd know right away if that were the problem - as you wouldn't even be able to drop a script into the object in the first place. The second case is usually just as obvious, but not always. If you bring up the about land window, it should draw parcel boundaries and you can verify you and your object are in the same parcel and are subject to the same land settings.

The third case has caught me a few times. Near the bottom of the script editor window, there is a checkbox labeled as "Running". Make sure that is checked. If it isn't, the script is turned off and will not reactivate until you check that box. It may also be possible that the script had previously crashed and is in a bad state. Hitting the reset button will reboot it and may help (though ideally you'd want to ensure you don't get into that situation in the first place).

Finally, add some simple instrumentation commands to your code like llOwnerSay("test"); at the beginning of your touch_start event,  state_entry event, or your on_rez event if you have it. That way, you can at the very least confirm that your script is running. The task then becomes figuring out why you're not getting any other output - which is dependent on how the script is written.

  • Like 1
Link to comment
Share on other sites

Thanks Fenix. Yes, I have tried all of those scenarios. I even managed to get the script working at one point, however when I unlinked and started editing the scale of the prim manually it disappeared and I couldn't find it. I expect it will be back in my inventory now, when I get back online because of the sim I was in has item returns set up. It is baffling though. I bought it as a 100% mesh object, yet at least one prim was a sculpty. I only realized when all of a sudden I couldn't move around in the space inside it. So I think the problem is not with mesh after all. I'll investigate further, but thanks for the very helpful reply. I was having a bad day yesterday and my patience was running low. Normally I would have persisted myself to eliminate all possibilities. I gave in to the temptation of seeking help here among people who are much more qualified than myself :)

Link to comment
Share on other sites

9 hours ago, Pedlar Decosta said:

Thanks Fenix. Yes, I have tried all of those scenarios. I even managed to get the script working at one point, however when I unlinked and started editing the scale of the prim manually it disappeared and I couldn't find it. I expect it will be back in my inventory now, when I get back online because of the sim I was in has item returns set up. It is baffling though. I bought it as a 100% mesh object, yet at least one prim was a sculpty. I only realized when all of a sudden I couldn't move around in the space inside it. So I think the problem is not with mesh after all. I'll investigate further, but thanks for the very helpful reply. I was having a bad day yesterday and my patience was running low. Normally I would have persisted myself to eliminate all possibilities. I gave in to the temptation of seeking help here among people who are much more qualified than myself :)

Changing the scale of a mesh object will often change the Li of it, sometimes higher than you have spare prims for, and it will automatically return it to you. I typically only see that when linking it to a complex prim, like a torus, especially a tortured one. I suppose a sculpty would probably be pretty complex too because of the nature of how it's made with all of the triangles. That being said, the object that you say is a sculpty may in fack be a mesh that just has a solid physics model, instead of being open as the visual representation is. For example, a tree is cone shaped and odd shapes that are somewhat complex. You wouldn't normally need to walk inside or on top a tree, so the physics shape of it is probably just a simple cube

Link to comment
Share on other sites

Hi Ruthven, thanks for the reply. I had plenty of prims in the place I was building and I was actually making the build smaller. I assumed it was a sculpt because in the build console it was a sculpt with a sculpt texture. My limited knowledge of mesh ...and sculpties has me thinking that you can't see a sculpt texture for mesh, however I don't say that with any real confidence. I have actually started to take some tutorials for 3D models in Blender, but for now I feel like Schultz..." I know Nothing !!!" The build was in my lost and found folder and it still responds to the scripts. Maybe it was my connection... I have wireless and satellite internet and neither are problem free as I'm in the middle of nowhere.

Link to comment
Share on other sites

1 minute ago, Pedlar Decosta said:

Hi Ruthven, thanks for the reply. I had plenty of prims in the place I was building and I was actually making the build smaller. I assumed it was a sculpt because in the build console it was a sculpt with a sculpt texture. My limited knowledge of mesh ...and sculpties has me thinking that you can't see a sculpt texture for mesh, however I don't say that with any real confidence. I have actually started to take some tutorials for 3D models in Blender, but for now I feel like Schultz..." I know Nothing !!!" The build was in my lost and found folder and it still responds to the scripts. Maybe it was my connection... I have wireless and satellite internet and neither are problem free as I'm in the middle of nowhere.

/me nods, yep, if you're able to see the texture, and if it shows the stitching options, then it is actually a sculpt. Your connection shouldn't have an effect on whether or not it gets returned to you, sounds like there's another issue. I had a mesh object that I linked to a dimpled cut and hollowed sphere. The mesh was 3 LI and the sphere was a single prim. Linking them together shot the Li to way over 200, and I guess my parcel was pretty full at the time. (My skybox studio is a mess sometimes, lol) It auto returned that object as well as some parts of my building on the ground and some other odd small objects, but as a coalesced object 

  • Like 1
Link to comment
Share on other sites

11 hours ago, Pedlar Decosta said:

I had plenty of prims in the place I was building and I was actually making the build smaller. I assumed it was a sculpt because in the build console it was a sculpt with a sculpt texture. My limited knowledge of mesh ...and sculpties has me thinking that you can't see a sculpt texture for mesh, however I don't say that with any real confidence

You can't see a sculpt map in the sculpt map panel if it's mesh, because there isn't one, so it sounds like a sculpt.

Does any of the mesh linked to the sculpt use "materials" normal maps, specular maps etc...

See, I rezzed a Pet waterbowl, LI was, 7 ?, I set some specular shine on it, and the moment i did, it got auto-returned, not enough prim allowance...

This was on a 1/4 sim with nearly 2000 LI spare, so I was surprised, and went to check on an empty full sim sandbox, and discovered that applying a blank white spec map to that 7 prim (one sculpty) dog bowl pushed it's LI to OVER 2200...

It's one of the changes in SL, putting materials on regular old school "tortured" prims forces their LI to be calculated like mesh rather than the old kludge fix 1 prim = 1 LI method.

With multi part mesh builds, linking or unlinking can change the physics type from none or prim to convex hull, with walkin problems, AND LI hikes, editing one bought structure, I found that unlinking and deleting an unused decor mesh from it pushed the LI from 32 to 800+, until i went through, edit-linked style piece by piece resetting the physics types.

This isn't that much different from the old problem of scripted/torii/sculpted prims in prim based convex hull builds, back before mesh, jacking LI up (although not as much as the "materials on prims" option now.

It's almost certain one of these issues is what's causing the auto-return issue with your build.

 

Edited by Klytyna
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 5.12.2017 at 12:28 AM, Pedlar Decosta said:

It is baffling though. I bought it as a 100% mesh object, yet at least one prim was a sculpty. I only realized when all of a sudden I couldn't move around in the space inside it.

That can happen to meshes too if it has faulty physics or in some cases if you scale it too small.

 

17 hours ago, Pedlar Decosta said:

Hi Ruthven, thanks for the reply. I had plenty of prims in the place I was building and I was actually making the build smaller.

Depending on how the mesh was made, the land impact may well increase when you scale it down. It can increase dramatically too. In the most extreme case I've seen myself, a 1 LI mesh went all the way up to well over 20,000. I'm not sure how much over since it couldn't be rezzed afterwards, not even in a completely empty sim. ;)

 

17 hours ago, Pedlar Decosta said:

I have actually started to take some tutorials for 3D models in Blender, but for now I feel like Schultz..." I know Nothing !!!"

I can tell you, the more you learn about mesh in Second Life, the less you know.

I can't really criticize you - the first website I ever made was a tutorial how to make a website. :$

The by far best place to learn how to make mesh for Second Life, is this forum. Look especially for posts by Drongle McMahon, Arton Rotaru, Aquila Kytori and ... ummm. me.

Edited by ChinRey
  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2326 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...