I have 25 models, each with a nr of frames between 1 and 32 frames.
There are 4 cameras and I am to render 4 x 25 tasks in total.
Can't set up 100 tasks in Batch Render dialog box because it would take weeks.
I made a bat file programmatically to render things, but It loads and closes the .max file for each task, and due to the high size of the max file, it takes a minute. This is more than the render itself.
How can I make the bat file use the already opened 3d max and not close/open it each time? Or how to programmatically generate instructions for those 100 tasks and not open/close the max file?
You would typically use maxscript for it.
You need a script that opens the file, set's the cameras, renders out from each camera, close the file and go to the next one - without closing 3dsmax.
if you break it down into each step then there are examples for each task in the maxscript manual.
Load maxfile:
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/files/GUID-624D3D05-B15D-4A97-9F15-DA35CDB0DDD2.htm#SECTION_2D91EF0731CE4C5889583719F815BDAA
Set viewport camera:
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=files/GUID-8AA71F9E-F4F0-4437-A44E-9683619E89DE.htm,topicNumber=d30e683762
render from camera:
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=files/GUID-9175301C-13E6-488B-ABA6-D27CD804B205.htm,topicNumber=d30e676998
Related
I am trying to load 1k+ lines long files into GtkSourceView, using GTK3 in Python (PyGObject).
Whenever I set the text, it takes 2-3sec to fully appear (it is slowly scrolling and adding new lines at the bottom). I have connected a profiler and it shows 99.5% of cpu time in Gtk.main.
Basically I am using this for setting text:
txt_sourceview.get_buffer().set_text(new_text)
Am I doing something wrong here? Is there a way to speed this up?
I wrote a Node.js app that creates images that I want to stitch. I want to create one image with over 10,000 charts. My original solution was to create images each with over 200 charts each and stitch those together. That results in 50 images being stitched.
I now wish to create one chart per image, resulting in over 10,000 images, and stitch those together. When I drag and drop the files into Fiji to create a montage, it opens each individual one. It takes way to long to open the entire collection.
Is there a way I can create a montage of thousands of images and stitch everything into a single file in Fiji that doesn't require every image being opened?
You say that you want to stitch your image, which implies your goal is to find where these images overlay from a specific channel, but when you say montage, it makes it seem like what you really want to do is concatenate the images into a stack or align them into a montage. To me it appears that you have a program which will output some form of stack which has 200 planes, and then concatenate them together or align them as a montage.
In principle, you will have to open every image, but opening them with batch mode on and running the operations by macro will reduce time by not rendering the viewable image. It would not be possible to run ImageJ/FIJI operations on an image without opening it, as this is beyond something like renaming or deleting a file.
If you really meant that you want to stitch them, use the stitching plugin function for Grid/Collection stitching, and set the overlap to zero. This requires having your images be in a single folder, and in your case splitting them into individual images instead of sets of 200, with each file labeled with an increasing number (i.e. file_name_1.tif, file_name_2.tif, where each file_name is the same and only the number changes). If you have stacks of 200 and are happy to keep them that way in the created montage, the file naming convention needs to be the same. You should select the Fuse and Display option to get the resulting image. The output will be a merged, larger image.
When you are trying to somehow stitch the images and overlay the stacks, scripting the commands to run it in batch mode would also work.
For stitching I highly recommend the MIST plugin. For batch opening files, try dragging and dropping the folder containing the images rather than the images themselves. Alternatively, go through File -> Import -> Image Sequence.
i have almost 5k different logos and also have 5k different images, i want to add them up, is there any tool or way to do this.
I have seen tool which add one logo to all images, but it don't work with my scenario, i need a tool or way which allow me to multiple logos to add on multiple files, for example
image 1 + logo1.jpg= image and logo1.jpg
image 2 + logo2.jpg= image and logo2.jpg
and soo one.
is there way to do this work quickly instead of editing every pic manually
You could achieve this by creating actions and then using batch actions on folders containing the files. If you sort all the images you want to have logo1 into their own folder, you can use a batch action to add the logo to every image in the folder and then save the new image as a jpg in a different folder.
Here is a short youtube video explaining batch actions, and here is a much longer, more detailed video that's officially from Adobe. If you don't like videos, this page explains the process with graphics.
In short, here's what I would do:
Sort all the images you want to have logo 1 into a folder.
Open logo 1.
Select all and copy the logo.
With your logo still on the clipboard, open the first image.
Go to Windows --> Actions
Hit the little paper peeling icon to create a new action
Hit the record button to record your action and name it something you can remember later.
Paste your logo, and place it where you want it.
Go to Layers -> Flatten Image
Stop recording (or you might record how you save, but this doesn't always work. If you do save, don't save over your original, rename it!)
Go to File -> Automate -> Batch, and choose the action you just saved, and select the folder you want to save the new logo-ified images into.
Carefully set all the save options
Click Run!
If you get prompted to choose color options on every save, you might want to redo the action so it includes (or does not include) "save as" options.
This is the short version of the answer. I'm sure there are ways to script it, too, but this may be easier if you're not familiar with scripting.
Okay, here's what's going on..
I have a folder that has 200 images in it.
They're all named - p001.png, p002.png, p003.png... all the way up to p200.png
I need to create an Action that pulls in 2 images at a time, in ascending order.
After Resizing & Positioning the images, I need to add text above each image that says "Image #X"
(in place of 'X', would be the number of the corresponding image)
Once it finishes with the 1st two images, it saves it in a specified folder; and pulls in the next 2 images.
And just repeats the process until it goes through all 200 images.
Here's my 2 questions:
1 - Is it possible to pull in 2 images at a time in ascending order, from a specified folder, via an Action?
2 - Is it possible to replace 'X' with the image's number, as it moves up in ascending order?
Any kind of help with this would be Greatly appreciated.
Thanks in advance!
p.s. I'm using PhotoShop cs5.5 if that makes a difference
First checkout the Contact Sheet functionality, perhaps you can achieve your tasks this way.
In terms of scripting, there are indeed functions available to :
load a file into the document
create a text layer
set the text of the text layer
Check out the Photoshop CS5 JavaScript Language Reference for more details.
Additionally, you should have Extend Script Toolkit installed as well.
Run Extend Script Toolkit then give this a quick go:
#target photoshop
alert("Hello World!");
Using the Object Model Viewer (available under the Help menu) you should be able to select the Photoshop Type Library and view useful available objects such as Application,Document,Layer, etc. and see their properties and methods.
Additionally the Data Browser panel and autocomplete should help.
I am using Selenium with PhantomJS to scroll to the bottom of an infinitely scrolling page of Twitter search results.
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
I manually set a number of times for it too loop (I try to estimate how many reloads the web driver can take before crashing). When done, I grab the raw html:
text_file.write(driver.page_source.encode("utf-8"))
This works ok, but I am looking for a way to keep the program going without the 'browser cache', or whatever it is called, filling up. Any ideas on how to achieve the steps below?
Run the driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")command for X times
Then dump the loaded raw html to a text file
Then run the driver for X times again
Then dump the loaded raw html into another text file, but not the content loaded in step 1, only the new content loaded in step 3
This would empty the browser/driver memory into several output text files and make it possible for the loop to practically go on forever. Any ideas?