PDA

View Full Version : Skript for switch Instances visibility ???



Rajce
12-08-2017, 12:06 PM
Hello,
I have a question about the script makers. Could anyone create a script that would bulk the visibility of the Instances? Preferably according to the visibility of the parent.
Example:
If we have a null point with Shade visibility set, then all instances generated in the Instances Generator of this null point will also shadow Shade visibility.

MonroePoteet
12-08-2017, 12:33 PM
Without a script, you can select all the Objects added to the Instancer by selecting the first one, holding down SHIFT and selecting the last one. Then, whatever visibility you set on any one of them will effect all of them.

138756 138757

138758 138759

mTp

Rajce
12-08-2017, 12:56 PM
Sorry ... this course of course I know!

I'm going to simplify the bulk switching without having to go into the Instancer Generator.
Imagine a scene where you have different plants cloned using Instances at a null point. In a normal procedure it means going inside Instancer Generator and switching visibility, close and go to the next null point. When I decide for another visibility, I have to go through it again.
My vision is that the instance behave according to the parent object. Visibility is just one item. Similarly, it could transmit the necessary Sketch Color.

Sensei
12-08-2017, 12:57 PM
I tried, but using LWSDK it's not possible.
However, there is a way to do it, nasty hack way.

MonroePoteet
12-08-2017, 01:13 PM
Sorry ... this course of course I know!
...


OK, just wanted to make sure.

The Layout Commands reference for LW 2015 doesn't show any accessible command for modifying the Instancer's visibility, so I don't think an LScript or Python script is possible:


ObjInstancingEnable nenabled

Enables or Disables instancing on the object.
ObjAddInstancedMesh xID

Adds an item to the list of items used as instances.
ObjRemoveInstancedMesh xID

Removes an item from the list of items used as instances.
ObjInstancePlacementSource xID

Sets the instancer source item from which the points/polygons/particles are used from.
ObjInstancePlacementType ntype

Sets the instancer placement type, which can be Item (0), Points (1), Polygons (2) or Particles (3).

Using LS Commander, I don't see any accessible commands in either the native Instancer or DP Instancer. Maybe Sensei will give details on the "nasty hack way"! :)


mTp

Rajce
12-09-2017, 10:02 AM
OMG
and I'm still using the old 11.6.3
Well, I can only hope that some Commands added to the new version (God willing and will be)

raw-m
12-09-2017, 10:15 AM
OD Tools has this, not sure if it work on 11.6, though.

Rajce
12-09-2017, 01:26 PM
@ raw-m
Can you tell me exactly which Tool works as I want? I read descriptions of the tools and anything that comes to me working my request.

raw-m
12-09-2017, 02:07 PM
https://vimeo.com/114392749
https://vimeo.com/114410967

(Unless I’ve misread!) under the Display options in his menus you’ll see Enable Instances and Disable Instances. Selecting all the items that have Instances attached will turn them on/off with a simple click of a button.

Rajce
12-11-2017, 04:26 AM
I'm afraid we do not understand.
If I understand this, OD Tools allow Enable Instances and Disable Instances. However, the HoS_Toggle_Instances script can also be used.
However, I need to switch between Visibility types - Bounding Box, Shade, Wire frame, Textured.