Notifications
Clear all

[Closed] incompatable types

strange forum bug lost my response in the internets

I already understood that start 0 end 1 = 2 frames, I was flabbergasted that you cant get it lower that 2 frames, say you just want 1 frame, Time Configuration will not allow you to set start 0 end 0 for instance or start 1 end 1. So – anyway I can prolly do it with code. However new problems, all my outputs are black – nothing. Yet! If you preview through the pngs in the output folder with the windows viewer while it is running the script you get a sneak peak of the correct render – before it mysteriously get overwritten with the black image. Almost as if it is rendering each frame twice but replaceing the 1st file with pure black.

Fixed it. It was outputing black because I was using target cameras, as soon as I made the free it solved it.

2 Replies
(@focomoso)
Joined: 11 months ago

Posts: 0

You sure that was it? Target vs. free cameras shouldn’t make any difference in the output.

(@rustyknight)
Joined: 10 months ago

Posts: 0

Actually, there is nothing wrong with targeted cameras, but you haven’t done enough research into what the camera’s collection is returning.

The camera’s collection will also return the “target” helpers, as well as the camera’s themselves. So with one target camera in the scene, we can do:

for cam in cameras do
  	format "%
" cam

which outputs something like…

$Target_Camera:Camera01 @ [46.125462,-0.000001,29.520296]
$Target:Camera01.Target @ [-71.955719,0.000001,-23.616236]

So if we then do something like:

for cam in cameras do
  	format "%
" (classof cam)

we get:

Targetcamera
Targetobject

Therefore, if we were to filter the result such:

for cam in cameras do (
  	-- Check for anytype of camera...
  	if (isKindOf cam Camera) then
  	  /* Do your work here */
  	)
  )

Your code would still work

Shane

How about this:

rendTimeType – integer
Get/set the type of time range to be rendered.
Possible values are:
1 – Single frame.
2 – Active time segment (animationRange).
3 – User specified Range.
4 – User specified Frame pickup string (for example “1,3,5-12”). See rendPickupFrames below.

[left]

[/left]

Page 2 / 2