Group support in PyPRP

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Group support in PyPRP

Postby dendwaler » Sat Apr 17, 2010 5:52 am

In Blender it is easy to add objects in a "Group" in the tab "object and links"
Is it possible to assign Alcscript to the whole group "Palms", and how do you do it?
example:
I have 45 palms they all need the same script for late rendering.
adding them all to same group makes this scripting easier.

I have to put them in a group anyway, because then my outliner window shrinks.
Forming groups is the only way to do that.

Is it possible?
Attachments
object and links.jpg
object and links.jpg (7.64 KiB) Viewed 2546 times
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Group support in PyPRP

Postby Jojon » Sat Apr 17, 2010 9:41 am

To slimline your outliner list; use parenting.
You can make the palmtrees children of any object - you might use the main terrain, one of the trees, or a new empty object (your "trees in here folder", if you like).

EDIT: ..and in case you were wondering; I just made a little test, to make sure and objects do NOT inherit alcscript properties from their parents, alas. :7
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Group support in PyPRP

Postby dendwaler » Sat Apr 17, 2010 10:40 am

That is possible indeed, but everyone has his own habits.
I use parenting for 1 object, that is build up from several parts and belong together.
Using groups is a step deeper, because in there are the already parented objects.
Staying with my palm example.
Only model and texture 1 leave and 1 stem.
Make other leaves with an array and parent it with the stem to form the palm.
Form a group of palms and assign an alcscript to the group.
That is the way i like.
It has the structure of directories and subdirectories in an operating system.

But thx anyway for your answer, i like your emty object idea, never thought of it.
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Group support in PyPRP

Postby JulyForToday » Wed May 26, 2010 7:14 pm

I actually had a question about something related to grouping...

There is a feature of blender that allows you to use an entire group as a library. So say I have an entire complicated interior of a building in Blend file A. I can add all the separate objects to a group, and then I can load that 1 group as a library from Blend file B (a large file with the whole age, needs the interior of the building). In order to get it working correctly, you need to turn on the Dupligroup button in the animation settings of a "stand-in" object (an empty probably being best). Then you type the name of the group next to that button, and voila. Your referencing an entire group. Great feature to reference large sets of separate objects from another file. Problem is, if you export to Uru, no part of that group will export. There are no error messages from PyPRP in the console. It just acts like it's not there.

I thought that since PyPRP could handle proxies I tried to set this thing up with a "stand-in" object within the library file itself. So you have the group of objects, and an empty that is referencing that group, all within the library file. Then you add that "stand-in" empty as a proxy. Voila.. Shows up, much like before, but it's all through a proxy. But still, PyPRP doesn't seem to realize this is going on, and just ignores the stuff the proxy has. In both situations PyPRP throws no errors, and exports successfully. You can load it up in Uru, and it will load. But the objects in the group won't be there.

Here is a blurb about this feature in a google book:
here

Another blurb:
http://en.wikibooks.org/wiki/Blender_3D ... _Libraries

I tried using a "Duplicator" as indicated in the preceding link. It gives you something similar to the Dupligroups thing (cept it's not an empty, and cannot be reassigned). Likewise, it does not get exported to Uru. It is ignored like the dupligroups.

I'm thinking that this might be happening if PyPRP isn't set up to handle groups in any capacity. I realize using parenting is probably better for use IN Uru. But as far as organizing things in Blender, Groups can be incredibly useful for large scenes. So it's frustrating that groups can't be utilized to help organize scenes because PyPRP can't take stuff in groups and just export them as individual objects.

Just wondering if anyone else had thought about this at all, or even noticed the feature for appending groups exists.
Last edited by JulyForToday on Fri Jun 04, 2010 9:07 am, edited 1 time in total.
User avatar
JulyForToday
 
Posts: 118
Joined: Sat Sep 29, 2007 5:34 am

Re: Group support in PyPRP

Postby Aloys » Thu May 27, 2010 5:47 am

I wasn't aware of this feature at all, so thanks for the heads up. :) I had never had the need to link/append full groups before but it might be useful to know though.
I do append external objects to my scenes from time to time, and it indeed works fine because only a single object is being linked. I've no idea how hard it would be to implement that in PyPRP.
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Group support in PyPRP

Postby JulyForToday » Fri Jun 04, 2010 9:31 am

So far, we have 3 issues in this thread:

- OP's grouping in Uru
- OP's grouping and alscript
- My issue with duplicated groups

Grouping in Uru
I performed a test, and PyPRP does recognize the member objects of a group. PyPRP basically treats them like normal objects, and pretends the grouping does not exist. They all still export, and act like normal objects in Uru (without any grouping).

For those individuals who really want the grouped objects to work like a group, in Uru itself, parenting is the best alternative. Maybe it would be possible then to set up something in PyPRP where when a group is exported, a new empty is created with the name of the group, and the member objects are parented to the empty. Although a user doing this manually would probably be the best way of doing business.

Grouping and Alscript

I don't see how this would be possible until we have better tools for alscript handling in Blender. Right now all we have is a single large text file. In the future (probably with 2.5 and some of the coming changes for PyPRP) perhaps there will be some kind of handling system that works through a GUI that allows you set options for objects as individuals and as batches (and that will be handy for things like visregions). Then it would be possible to have a single script and be able to apply it to a number of different objects (1 palm script for 30 palm trees).

Duplicated Groups

As a user you can add each of your objects to a group (and an object can be in multiple groups). You can then effectively create a clone of the group using either a Group Duplicator, or Dupligroups (dupligroup uses an empty and has that nice ability to re-assign what group it will clone).

And this can work between two files, meaning you can reference a group in blend file A, and the entire group, and all it's numerous associated objects will now be cloned in blend file B, yet easily movable (unlike a linked library) yet not editable (like a proxy object). And in fact, this is the only way you can reference a group from another blend file.

The major benefits of this being that if you are working on a large scene, you don't have to join all you objects into 1 mesh (making editing difficult), or otherwise linking a very large list of individual objects.

As I said before, PyPRP does recognize the objects in a normal group. I did some more tests and Dupligroup and Duplicators cloning a local group (no linking from another file) and they seemed to be ignored by PyPRP and are never exported to Uru. Naturally linking them isn't going to make a difference. PyPRP will ignore any dupligroup or duplicator, file linking aside.

It would be nice if somehow PyPRP could actually take a duplicator, grab it's references, and export them. Basically treat a cloned group as a normal group. So when it all ends up in Uru, the components of the cloned group are just normal objects.

I don't how exactly you would code this, especially with 2.5 not so far away. I'm not sure how groups work in 2.5, or if it's pointless to implement anything like this until later.

Here is a page containing information about Blender's Object Groups.
User avatar
JulyForToday
 
Posts: 118
Joined: Sat Sep 29, 2007 5:34 am


Return to Building

Who is online

Users browsing this forum: No registered users and 9 guests

cron