0
$\begingroup$

A while ago I’ve read about what “Make Single User” does and tested it. Which was totally amazing and mind blowing.

e.g. later I learned about few Python scripts with which it is possible to move UV faces and even their vertex points in order to shift textures on planes.

And wanted to find out is there any way of how to get a python script using object to work as what “Make Single User” does?

As every new Python script using object which gets spawned into scene would work simultaneously with previously spawned in object, even if I move empty in between spawning in the object while its processes would affect every single new spawned in object which is using the same instance of the .py script.

Been trying to type with many variations of keywords in order to try to find at least someone else on the web who was looking for solution but unfortunately so far I had no luck.

Any hints please?

Thanks in advance!

enter image description here enter image description here enter image description here

$\endgroup$
8
  • $\begingroup$ Hello ! I think your question is a bit convoluted, could you add a simple diagram or interface screenshots showing off exactly what you are trying to achieve ? $\endgroup$
    – Gorgious
    Apr 4, 2022 at 6:42
  • $\begingroup$ I've just added x3 screenshots containing what I was on about. There's the script, which is not in the state in which i'd want to use it for some purposes. The mouse over logic setup, as well as the empty stuff to spawn it into scene. It was just testing in this case to move the individual UV vertex points. $\endgroup$
    – Noob
    Apr 4, 2022 at 15:58
  • $\begingroup$ Basically if I would action a shapekeyed "cube". Which gets spawned into scene while passed through an empty hooked up with keyboard sensor e.g key A, and connected through "And" controller, which gets connected to "Edit object" and select "cube" in add object - object drop down selector inside of Blenders logic editor. The "cube" could be hooked up with key "S" for its keyboard sensor and connected to "and" controller, followed by connecting it to Action actuator which would play the shape key of the "cube" e.g. WITHOUT make single user - $\endgroup$
    – Noob
    Apr 4, 2022 at 16:02
  • $\begingroup$ - enabled, and if 10 cubes would get spawned into scene, then by pressing S to play the key action, all of the 10 cubes would execute their actions in the same time. But if I'd add mouseover sensor connected to what S key is connected to to execute action, Then - no matter over which of 10 spawned in cubes I would mouse over and press S to play the key action, they would play the actioned shapekey only on those which get mouse over while "s" is being pressed. $\endgroup$
    – Noob
    Apr 4, 2022 at 16:02
  • $\begingroup$ e.g. an object set with "always sensor" set on true, would get passed to a script, which is moving UV faces over the texture to make it to look like texture is sliding over the plane. If I'd add multiple planes in the scene, they all would be functioning by the same script to which the plane is connected to, no matter even if I motion the empty so that the next plane with UV unwrap moved by the script would do the same what previously spawned in plane would do to prevent them of being spawned or added one on each other. $\endgroup$
    – Noob
    Apr 4, 2022 at 16:17

1 Answer 1

0
$\begingroup$

Been lucky that someone bothered to read my questions and eventually I have got my spider fingers on what I was looking for.

Works perfectly once added to a mouse object with mouse over any sensor looking for objects property to end them upon pressing the LMB button.

import bge

Cont = bge.logic.getCurrentController() Own = Cont.owner ClickSens = Cont.sensors["MClick"] OverSens = Cont.sensors["MOver"]

if ClickSens.positive: Target = OverSens.hitObject if Target: Target.endObject()

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .