Itoo Software Forum
Forest Pack => Forest Pro (*) => Topic started by: George on October 01, 2012, 04:44:34 AM
-
I can create new instances ($.trees.create()), I can delete them ($.trees.delete()), I can edit them ($.trees.edit()), I can get the count ($.trees.count()), but I can't get a list of pos, rot, scale for a given geomID. Could you add an accessor so I can iterate over them and check the ID, ie. $.trees[1], or is there already some way of doing this?
I'm making a script that converts (creates or appends) a selection of objects to FP, and I don't want to overwrite existing instance positions, nor do I wish to duplicate them, so I need to check what already exists and what doesn't.
-
You can use $.trees.getPosition 1. There are a set of functions to get each parameter. Please, use showinterfaces $ to see the updated list.
Anyway, there are some caveats to implement this functionality:
1) Forest modifies the order of the items (basically the instances are ordered by ID).
2) There is a bug in v.3.9.4 with the functions that return the items size. Anyway, i could send you a patched version.
Alternatively, you can create items using other objects as reference, using Tree Editor->Creation Tools. There is an option to keep the existing items (turn off "Delete existing items").
-
Oh great - I forgot about showinterfaces()!