Enhancing OOPS, Tuhopuu Updated with python/oops accsess!

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Thu Jul 22, 2004 12:51 am

Hi, Im busy now but.... well Id like to have some discussion features in the oops window like grouping, this is somthing I think could be quite usefull.

- Its not dead, just asleep. but Id liek people to continu discussion, any new ideas can beadded allong the way. and when I have time.
- Cam

Monkeyboi
Posts: 251
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Post by Monkeyboi » Thu Jul 22, 2004 11:05 am

ideasman wrote:Hmmm... the problem with pinning is that you'd need to add extra data to the blend file- (what is and isnt pinned)
Is that a problem? Are you thinking about backwards compatibility?
I was thinking of adding key shortcuts for selecting other members of a group but the group could be selected on right click also-
I'd go for key shortcuts, it would be frustrating if you couldn't select single objects after you have grouped them. I understand this as a quick way of storing object selections - IPOs, Materials etc. would still act per object, not per group. If you want something consisting of several objects to animate as one, you would have to use the good old Empty parenting technique.

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Thu Jul 22, 2004 12:16 pm

Monkeyboi wrote:
ideasman wrote:Hmmm... the problem with pinning is that you'd need to add extra data to the blend file- (what is and isnt pinned)
Is that a problem? Are you thinking about backwards compatibility?
I was thinking of adding key shortcuts for selecting other members of a group but the group could be selected on right click also-
I'd go for key shortcuts, it would be frustrating if you couldn't select single objects after you have grouped them. I understand this as a quick way of storing object selections - IPOs, Materials etc. would still act per object, not per group. If you want something consisting of several objects to animate as one, you would have to use the good old Empty parenting technique.

Adding extra inf ointo the blend file is a problem since I dont know how to do it.... well last time I tried it gave an error when compiling saying there was an offset problem (I did read the docs but no joy). - Other then that. no. its not a problem.

Your right, its realy a way of remembering selections, not like illustrator's group. - It would be like grouping to the user- But not restric the selection to the 'group' so it would be flexible too.

- Cam

mpan3
Posts: 0
Joined: Wed Mar 24, 2004 7:16 pm

Post by mpan3 » Fri Jul 23, 2004 5:20 am

I'm mostly intrested in the ability to DETELE datablocks so I can finally get rid of unused images etc I don't want anymore.
Same here!

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

CHANGE Of Plans!!!

Post by ideasman » Sun Aug 08, 2004 2:37 pm

Change of plans (my plans anyway)
I figured out that most of the funky stuff can be done by adding the following class varibles in python.

oopsloc
&
sel

With these its possible to workout which oops blocks are selected and then modify them from python, etc.

__________ an email I wrote.
Hi All, I have been tinkering with the OOps for a while now and recently had the idea to impliment all the tricky stuff in python while giving python accsess to the oops data.

This is more simple then it sounds.

All we need as accsess to the oops x/y coords and weather the data its selected or not, blender alredy provides us with the rest.
object alredy have the .sel class var but Im adding it to all other datablocks. allong with the oopsloc class var (both can be read and written)

People often say thed like t be able to link materials to objects from the oops view (or similar things)
well if we can tell in python what materials are selected by: if Material.sel == 1..... then all we need to do is write a script that links all the selected materials with the actve object. Viola.
Similar methods could be used to unlink textures. or deleate datablocks other then objects.

These scripts could be added to a slot in the oops header menu- there is a lot of free space and general scene management scripts coudl be added there as well as plugins that manage the relationship between objects like the example above.

Other scripts could be made very quickly that:
* Arrange oops boxes into colums and sort an alphabetical order.
* Rename Selected datablocks (Not just objects)
* Modify the relationship of datablocks based on the selection.
* Layout the oops boxes using the objects worlspace X/Y X/Z etc as a basis.
* Better arrange oops boxes.
* Select groups of oops blocks that are clustered together.

so each datablock will have the added class vars (ipo for eg)
ipo.sel
ipo.oopsloc

Tuhopuu2 alredy has these vars for objects and the mesh, if the OOPs window is not initialized NONE will return for both these vars, (as opposed to crashing)
and the same with new NMesh objects that havent been Put yet.

Try thin in Tuhopuu2, animates a mesh and an object datablock on the oops view.


from Blender import *
ob = Object.GetSelected()[0]
m = ob.getData()

print m.oopsloc
print ob.oopsloc

m.sel = 1

for x in range(100):
Window.Redraw(Window.Types['OOPS'])
m.oopsloc = (0.2 * x, 0.2 *x )

for x in range(100):
Window.Redraw(Window.Types['OOPS'])
ob.oopsloc = (0.2 * x, 0.2 *x )
- Cam



# This sctipt works in Tuhopuu2
________
This script is for arranging selected objetcs in the oops view. This works in tuhopuu2 only.

Ill add sorting by name then type later on,


# Arrange objects in a row

Code: Select all

from Blender import *

# Space the placement of oops blocks in the oops view
xspace = 5.0; yspace = 1.8

maxrow=100 # Max rows/cols before moving onto the next row.colum.

allign = 1 # 1:vert/0:hoz

origx, origy = Object.GetSelected()[0].oopsloc
x = y = 0
for ob in Object.GetSelected()[1:]:
 if allign: # Verticle
   if yspace *maxrow < y: x += xspace; y = 0
   else: y+= yspace

 else:
   if xspace *maxrow < x: y += xspace; x = 0
   else: x+= xspace  
 ob.oopsloc = (x+origx,y+origy)

Monkeyboi
Posts: 251
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Post by Monkeyboi » Sun Aug 08, 2004 3:33 pm

Will you need Python installations for this to work? As long as it is seamless, it's ok that you are going to do it in Python, but if it implies lots of extra hassle for the user, I'm not sure if it's a good idea.

Let me ask: what made you decide to move to Python instead of C?

steve_t
Posts: 30
Joined: Tue Nov 05, 2002 7:10 am

Post by steve_t » Sun Aug 08, 2004 3:55 pm

sounds like a great Idea to me! Then even I can make my own sequence features.

- steve

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Sun Aug 08, 2004 5:56 pm

Monkeyboi wrote:Will you need Python installations for this to work? As long as it is seamless, it's ok that you are going to do it in Python, but if it implies lots of extra hassle for the user, I'm not sure if it's a good idea.

Let me ask: what made you decide to move to Python instead of C?
This wont require a python install, the functions will be accessed from the menu so you wont even know there coded in python.

Coding some of this stuff in C would be a nightmare too.

Monkeyboi
Posts: 251
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Post by Monkeyboi » Sun Aug 08, 2004 10:05 pm

Sounds good then!

Post Reply