It is currently Thu Sep 02, 2010 9:56 pm

Registration
Login Help

Advertise Here

[Plugin] Layer Face Camera

FAQMembersRegisterLogin

[Plugin] Layer Face Camera

Postby EarthMover on Sun Sep 20, 2009 2:30 pm

Is it possible by ruby to create a script that can access the edit function of all components on the same layer simultaneously? I am looking to have a script that will activate the "Always Face Camera" option of all components on a given layer. I recently purchased the entire cadplants.com library. This is over 5500 plant components of great quality. Unfortunately none of them are set up to Face the camera. As they are inserted into the scene, each plant is a component assigned to the same layer. If it is possible to activate all on layer to always face camera, it would save me so much time and frustration. I just need a really simple script, or some help with a snippet or two of code.

Thanks kindly!

EDIT - Plugin attached. (thanks Jim!!) I added a file loader and a toolbar button to the script. I will advise the author of the plant library to have his SU customers visit this thread to get the plugin, which is sure to be a time saver.
You do not have the required permissions to view the files attached to this post.
Last edited by thomthom on Tue Dec 08, 2009 9:40 pm, edited 3 times in total.
Reason: Just cleaning up and organizing the Plugin forum. Correcting [Plugin] tag
A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist. - R. Buckminster Fuller

Some of my 3D stuff http://www.facebook.com/#!/album.php?aid=178785&id=230582785069
User avatar
EarthMover
 
Posts: 1134
Joined: Fri Sep 12, 2008 9:06 pm
Location: Eastern Pennsylvania
Name: Adam Hails
Operating system: Windows Vista 64-bit
SketchUp version: Sketchup 7 Pro

Re: REQ - All on Layer Face Camera

Postby majid on Sun Sep 20, 2009 3:16 pm

dear mate , there is a trick , but time consuming: open the model go to :window-->model info-->File-->Allignment-->(chek) always face camera
then save it so that later could see it obviousely,
now if you insert in in another file , it would be a face-camera component.
User avatar
majid
 
Posts: 891
Joined: Sun Dec 16, 2007 8:51 pm
Location: Isfahan Iran
Name: majid
Operating system: xp
SketchUp version: 7

Re: REQ - All on Layer Face Camera

Postby Jim on Sun Sep 20, 2009 3:39 pm

Yes, it's possible. Note it should also be possible to batch process components stored on disk.

load this, and type 'layer_face_camera' in the Ruby Console.

[ plugin moved to first post ]
I probably over-simplified that.
sketchup plugins & news blog
Jim
 
Posts: 2876
Joined: Mon Nov 12, 2007 10:13 pm
Name: Jim Foltz
Operating system: XP Pro SP3
SketchUp version: Google Pro 8.0

Re: REQ - All on Layer Face Camera

Postby EarthMover on Sun Sep 20, 2009 4:23 pm

Thanks so much Jim! (and Majid) The code works great and is exactly what I needed. :berserk:
A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist. - R. Buckminster Fuller

Some of my 3D stuff http://www.facebook.com/#!/album.php?aid=178785&id=230582785069
User avatar
EarthMover
 
Posts: 1134
Joined: Fri Sep 12, 2008 9:06 pm
Location: Eastern Pennsylvania
Name: Adam Hails
Operating system: Windows Vista 64-bit
SketchUp version: Sketchup 7 Pro

Re: Plugin - Layer Face Camera

Postby Jim on Mon Sep 21, 2009 2:49 pm

I added support for a single Undo operation - otherwise it could cause a big mess if you change your mind..

I updated the .zip in the first post.
I probably over-simplified that.
sketchup plugins & news blog
Jim
 
Posts: 2876
Joined: Mon Nov 12, 2007 10:13 pm
Name: Jim Foltz
Operating system: XP Pro SP3
SketchUp version: Google Pro 8.0

Re: Plugin - Layer Face Camera

Postby EarthMover on Mon Sep 21, 2009 3:01 pm

Thanks Jim...I was just looking through other scripts to try and find the snippet that allowed this. I will study what you did. Thanks for the update.

This script, the plant library, Twilight and RPTools component search tool has turned SU into a super fast and powerful landscape design program for me! I'm really excited about the possibilities.
A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist. - R. Buckminster Fuller

Some of my 3D stuff http://www.facebook.com/#!/album.php?aid=178785&id=230582785069
User avatar
EarthMover
 
Posts: 1134
Joined: Fri Sep 12, 2008 9:06 pm
Location: Eastern Pennsylvania
Name: Adam Hails
Operating system: Windows Vista 64-bit
SketchUp version: Sketchup 7 Pro

Re: Plugin - Layer Face Camera

Postby Jim on Mon Sep 21, 2009 3:43 pm

Just updated again to fix a typo.
I probably over-simplified that.
sketchup plugins & news blog
Jim
 
Posts: 2876
Joined: Mon Nov 12, 2007 10:13 pm
Name: Jim Foltz
Operating system: XP Pro SP3
SketchUp version: Google Pro 8.0

Re: Plugin - Layer Face Camera

Postby majid on Mon Sep 21, 2009 4:32 pm

wowww mates...Sketchup progress by you ,ruby scripters is unblievable. thanx mates :berserk:
User avatar
majid
 
Posts: 891
Joined: Sun Dec 16, 2007 8:51 pm
Location: Isfahan Iran
Name: majid
Operating system: xp
SketchUp version: 7

Re: [Plugin] Layer Face Camera

Postby wahoowetzel on Sun Jan 31, 2010 7:28 am

I'm not sure if this is the best place to pose this question, but I think it may be relevant. If not, sorry.

I'm in the process of doing some renders which may be akin to Earthmover's "couple new pool renders" thread. My question is regarding the actual process of bringing in your own 2D image files in to SU and getting them to face the camera. The cadplants.com examples are great, I would love to understand that workflow to produce my own. But my first couple of tries have led to one random success that I have not been able to repeat, so at this point I would just be happy with a 2d image that faces the camera (even if it's not as easy and nice to use as the cadplants samples that you can switch lowres and hires images in and out and whatnot). What I get right now is a face (a png file that casts the shadow of the entire image file-not just the visible content) that comes in arbitrarily, and when I try to make it a component I have to explode it and then when I make the component and tick the faceme option, it gets whacked out.

Any detailed info would be great, thanks again. I'd love to be able to use a similar workflow to do what is described in this thread!
wahoowetzel
 
Posts: 31
Joined: Sun Jul 19, 2009 11:46 pm
Name: Jesse Wetzel
Operating system: Vista
SketchUp version: Sketchup 7

Re: [Plugin] Layer Face Camera

Postby rv1974 on Sun Jan 31, 2010 8:47 am

This script must change components axes to bottom center (+aligned to ground plane).
Otherwise it useless IMHO.
rv1974
 
Posts: 185
Joined: Tue Nov 13, 2007 11:38 am

Re: [Plugin] Layer Face Camera

Postby wahoowetzel on Sun Jan 31, 2010 9:21 pm

I think that this plugin is useful, I just need to understand the workflow and the steps that come before it. So I'll ask again, what exactly is the process for correctly setting up images for use as faceme objects in SU?
wahoowetzel
 
Posts: 31
Joined: Sun Jul 19, 2009 11:46 pm
Name: Jesse Wetzel
Operating system: Vista
SketchUp version: Sketchup 7

Re: [Plugin] Layer Face Camera

Postby EarthMover on Mon Feb 01, 2010 1:41 am

Here's a quick video of how to go about making a .png into a faceme component as well as a little peek into my workflow using RPTools, Cadplants and the Layer Face Camera plugin. http://www.screencast.com/t/NzhlOTUyNjYt

If you are making your own plants from image files, then the plugin is not very practical, because you have to make the component so making it face the camera is just a mouse click. For me, I use the plugin everyday and without it, my cadplants/rptools workflow wouldn't be practical. I essentially have thousands of high res plants that are cut out perfectly, but not setup as faceme objects. The plugin was born out of necessity for that and I would probably never use it on any other day to day sketchup stuff.
A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist. - R. Buckminster Fuller

Some of my 3D stuff http://www.facebook.com/#!/album.php?aid=178785&id=230582785069
User avatar
EarthMover
 
Posts: 1134
Joined: Fri Sep 12, 2008 9:06 pm
Location: Eastern Pennsylvania
Name: Adam Hails
Operating system: Windows Vista 64-bit
SketchUp version: Sketchup 7 Pro

SketchUcation One-Liner Adverts

by Ad Machine on 5 minutes ago

Shaderlight for SketchUp - discover a new way to render
Ad Machine
Robot
 
Posts: 2010


 

Advertise Here

Who is online

Users browsing this forum: No registered users and 2 guests