generative modeling for Rhino
I made this script for capturing screenshots to files automatically. You can create image file ( bmp, tga, jpg, pcx, png, tif ) from current view with using Rhino -ViewCaptureToFile
I used this for making sequence for animation Alphabetical Echo
Note:
- Write to PathToFile like C:\Users , without final "\"
- Extension can be bmp, tga, jpg, pcx, png or tif
- Don't forget to set Activate to "False" before close the GH file
UserObject: Current View Capture.ghuser | UserObject lies in User/Default menu
Example GH file: Current View Capture.gh
Tags: VB, screen-shot
Permalink Reply by cbass on September 20, 2011 at 10:30pm Great video, especially liked the audio, which is often neglected...
cbass
Permalink Reply by Eduard Haiman on September 21, 2011 at 12:36am Wonder if there is any instructions for using this ?
Tx
Sivam
can you show how this works? i can only make one frame, since it's a toggle. How did you do the animation?
Permalink Reply by Eduard Haiman on October 26, 2011 at 10:19am You can use Timer and Counter by Kangaroo, SPM or Firefly for create new name. When name change (if Activate is True) new file is created.
See example of definition
Permalink Reply by Dan Tartaglia on October 26, 2011 at 9:42am Great tool. I made a slight change to the code so that when you set the boolean to true, it checks if the file name already exists. If it does it appends a number to the name. This way you can create multiple capture files. For example:
filename-0.png
filename-1.png
filename-2.png
Code I added:
'Dim FullName As String = PathToFile & "\" & FileName & "." & Extension
Dim i As Integer
Dim FullName As String = PathToFile & "\" & FileName
While File.Exists(FullName & "-" & i & "." & Extension) = True
i = i + 1
End While
FullName = FullName & "-" & i & "." & Extension
...another possibility is to add a timer along with an additional input for the time interval.
Dan
Permalink Reply by Eduard Haiman on October 26, 2011 at 9:57am This is a useful change but I don't added this function because it is limiting way of numbering. In one may case I need use numbering as 001,002,... but in another case I need A,B,... I decided that more flexible means are creating file name separately from this component.
Permalink Reply by Dan Tartaglia on October 26, 2011 at 10:10am I'm new to GH but I know there are a number of uses for this tool. There are probably a hundred ways it could be modified for any number of purposes. It was great that you create it.
Permalink Reply by Kyung Joon Chung on November 28, 2011 at 1:04pm I rephrase my question.
Input as C:\Users\Stark\Desktop\ works fine but...
C:\Users\Stark\Desktop\New Folder doesn't. (The folder exists on the Desktop)
The out reads Path "..." does not exist!
What is the method to include folder path in the PathToFile?
Permalink Reply by Pieter Segeren on November 28, 2011 at 1:42pm Could be due to the space in the folder name. (just thinking out loud here...) try "New_Folder"
Permalink Reply by Kyung Joon Chung on November 28, 2011 at 1:55pm I just gave that a try... that doesn't seem to be the issue.
I tried "a" as folder name, and tried the following directory as well:
(and of course, the folder "a" already exists on the desktop)
C:\Users\Stark\Desktop\a
C:\Users\Stark\Desktop\a\
Both of them returned Path "..." does not exist!
Seriously confused here... am I doing something wrong or is this the way this script was designed? :(
Added by David Stasiuk 7 Comments 21 Likes
Added by stefano 5 Comments 7 Likes
© 2013 Created by Scott Davidson.
Powered by