PDA

View Full Version : Any script with Add camera with camera target premade?



prometheus
07-11-2012, 08:12 AM
Maybe feature request, but I think Ivé been asking for this quite some time ago.

Remarkable that you just canīt add a camera with premade camera target configured to a null or something.

you could either choose to check camera target when creating the cam, or have another camera type to add with premade camera target focused on a null.

Would be so much easier and faster setting up scenes with this workflow enhancement.

Or is there any script out there wich I am not aware of?

Michael

daforum
07-11-2012, 08:30 AM
How about the camera rig scene on the BLR site?

http://files.designburo.nl/lw//modules/TDMDownloads/singlefile.php?cid=&lid=182

evenflcw
07-11-2012, 08:48 AM
I don't think it's remarkable (that it's not provided out of the box). A main developers task is to supply core functionality which EVERYBODY needs. For INDIVIDUAL needs and customization (and more) a scripting language and sdk(s) is provided. Imho a reason for alot of the bloat in LW is that NT has catered too much to specific individuals and included what was offered to them willi-nilly (for free or through other association).

I also don't like them messing with essential functions like AddNull and AddCamera. If one wants to add features to such fundamental functions like those, I feel one should do it by adding an alternative function.

I could write what you need. Just provide some mockups for how you imagine the GUI (implying the workflow that goes with it) to save me some time having to figure that out myself. Coding can go relatively quickly compared to time spent on design trying to cater to every possibilities and finesse.

I might have something else aswell at a later date that cover this need in a much more generic approach to managing custom rigs...

xchrisx
07-11-2012, 09:23 AM
I had a few minutes this morning to make one for you. Its all open source so if you want to change anything feel free to customize how you would like it.

cp_newcamera.zip (http://www.chrisepeterson.com/ls/cp_newcamera.zip)

-chris

nickdigital
07-11-2012, 10:24 AM
I had a few minutes this morning to make one for you. Its all open source so if you want to change anything feel free to customize how you would like it.

cp_newcamera.zip (http://www.chrisepeterson.com/ls/cp_newcamera.zip)

-chris

Neat! The one tweak that I would suggest is adding an option to have the added camera parented to a null. Much easier to adjust the animation of multiple objects vs objects + camera.

xchrisx
07-11-2012, 10:36 AM
true, maybe ill add that today when i get time :)

evenflcw
07-11-2012, 11:27 AM
Very nice. Thanks. Thoroughly commented code too!

Mr_Q
07-11-2012, 12:03 PM
http://www.youtube.com/watch?v=nmDuS6fHGHs&feature=player_detailpage#t=10s

xchrisx
07-11-2012, 02:23 PM
update: cp_newcamera.zip (http://www.chrisepeterson.com/ls/cp_newcamera.zip)

I updated the script so now it has a parenting option. I made it only allowed to parent if the target is a newly created null. That way something doesnt get pulled out of a hierarchy on accident. I also fixed the target name not getting applied to the new null when it is created.

One bug that I have found which doesnt really affect the outcome of the script is the "Other Targets" pull down being active when it shouldnt when the script first loads. Toggling the "Create new null to target" option will fix the refresh problem.

Let me know if you guys find any other bugs and I will try to squash them. Hard to do thorough testing on my lunch break :)

prometheus
07-11-2012, 02:26 PM
Thanks everybody, much appriciated, have to take a look in to this tomorrow thou, been busy tweaking voxels, and have to get some rest and eat something.

Thanks again ..very much.

Michael

prometheus
07-13-2012, 01:25 PM
Thanks xchrisx, Just testing the script now.

I have added a custom Camera & target button under Items/create for easy acess.

Some suggestions follows..

Wouldnīt it be better to set the newly created cameras pivot point a few meters away from origin like the default camera when starting a new scene like -5m on the z axis? and have the null target at 0,0,0 origin?

After all, if you start an object or add a voxel, that generally goes on the centered 0,0,0 origin. at least for creating new objects, voxels directly in layout or centering them in modeler.

That way you get instant center focus to newly created objects.

I would also like to have the script started with target item checkbox already active, not sure if you disabled that for some reason?
After all, camera target is what it is suppose to do, and it feels unecessary to check it before ok

Edit...The name of the camera could have a different camera name from start, like camera & target for easier finding

Thanks again

Michael

daforum
07-14-2012, 09:12 AM
update: cp_newcamera.zip (http://www.chrisepeterson.com/ls/cp_newcamera.zip)

I updated the script so now it has a parenting option. I made it only allowed to parent if the target is a newly created null. That way something doesnt get pulled out of a hierarchy on accident. I also fixed the target name not getting applied to the new null when it is created.

One bug that I have found which doesnt really affect the outcome of the script is the "Other Targets" pull down being active when it shouldnt when the script first loads. Toggling the "Create new null to target" option will fix the refresh problem.

Let me know if you guys find any other bugs and I will try to squash them. Hard to do thorough testing on my lunch break :)

Thanks xchrisx, no problems here.
Your script works great :thumbsup:

xchrisx
07-15-2012, 10:20 AM
Updated version: cp_newcamera.zip (http://www.chrisepeterson.com/ls/cp_newcamera.zip)



Wouldnīt it be better to set the newly created cameras pivot point a few meters away from origin like the default camera when starting a new scene like -5m on the z axis? and have the null target at 0,0,0 origin?

changed so that the camera is moved -5m on the z and the target remains at the origin.



I would also like to have the script started with target item checkbox already active, not sure if you disabled that for some reason?
After all, camera target is what it is suppose to do, and it feels unecessary to check it before ok

check box for targeting is now on by default



Edit...The name of the camera could have a different camera name from start, like camera & target for easier finding

Instead of changing the default, I made the script store everything (except the target object pulldown incase it is removed before the script is ran again). That way whatever you name your camera, target null, and parent null will be saved across sessions.


-chris

jeric_synergy
07-15-2012, 10:48 AM
Instead of changing the default, I made the script store everything (except the target object pulldown incase it is removed before the script is ran again). That way whatever you name your camera, target null, and parent null will be saved across sessions.
-chris
Interesting. Where is that data stored?


+: I too don't find it "remarkable" that such an esoteric function is not included "in the box". It seems a very specific customization.

What is remarkable is xchrisx's generosity in coding it up and continuing to tweak it.

prometheus
07-15-2012, 11:33 AM
Interesting. Where is that data stored?


+: I too don't find it "remarkable" that such an esoteric function is not included "in the box". It seems a very specific customization.

What is remarkable is xchrisx's generosity in coding it up and continuing to tweak it.

I donīt see any esoteric about it, just simply easier to get up and running with add camera with functions such as camera target already there, max has it, vue has it built in, lightwave has not.
This is workflow additions, same could be said about, every scaling tab in Lightwave menus, a global scale lock or slider would make it so much faster and easier to tweak things, why
enter a value three times instead of one? same here, that is a UI workflow interface that software like vue has, and lightwave donīt.
Maybe a plugin or script writer could polish that too?

Thanks so much xchrisx, donations are under consideration, once I get me a paypal account.

Michael

zardoz
07-15-2012, 04:32 PM
I am one of those that is always asking some short-cuts to give a easier life to my mouse. So this is a great addition. I'm pretty sure I'll be using this. Thanks to prometheus for asking for it and to xchrisx for doing the script.
cheers

prometheus
07-15-2012, 04:53 PM
Remember to map the script to a button with edit menu layout, like Camera target and preferably place it under Item/camera target next to standard camera.

Go with the faster workflow.

Michael

jeric_synergy
07-15-2012, 08:03 PM
Seeing as how xchrisx whipped this up so fast, the question is:

Why did we ALL wait so long? Similar facilities would be handy for all sorts of things, especially lights.

prometheus
07-15-2012, 08:45 PM
I was just lucky some good guy snapped this thread up and had the time and knowledge to work it out, donīt think it might have been that difficult either to write, but cant tell since I donīt do scripting.

I believe theres a lot..lot of what I think might be easy things to enhance, but My agenda is not the same as newteks and what they have stored in plans, that is natural thou, they have a lot of other requests to deal with I suppose wich might have bigger impact for others.

Not sure if all here will find it useful either, I think so at least, and since I asked for it, it is fair of me to give some donations I think.

a couple of more requests :) But Newtek is actually the ear I am directing my voice to. I have a buckload of others, but to long to list here, are most workflow related.

1.infinite planes

2.displacement presets to drag and drop on to terrains grids.

3.a global scale/lock for texture parameters..
why the heck are we still entering a value three times if you want the same scale overall?
That is absolutly a waste of time with hitting numeric buttons several times and finger muscle powers:) and apart from that, it takes longer time to tweak things, you will also
be able to avoid wrong numeric entering in some of the x.y.z channels.

Im lazy, and I hope more people are so we cand find easier ways to do things

Cheers

Michael

prometheus
07-15-2012, 08:50 PM
A note, the first question you should ask, did someone really ask for this at any time before, and in a proper way? in proper forum threads?

Michael

jeric_synergy
07-15-2012, 09:07 PM
FWIW, back when the scripting language was AREXX, I used to write my own utilities all the time.

Now I'd probably skip straight to Python, since something tells me that LScript will be deprecated sooner or later (my money's on LW13) and knowing Python in general is more widely applicable. AFAICT, Python now is supposed to be comparably powerful as LScript. (Is this true?)

I'm pretty sure people have asked for lighting 'boards', and one-click 3-light setups before.

xchrisx
07-15-2012, 09:15 PM
Personally, i believe python is now more powerful than lscript, however due to the lack of documentation and other script examples I dont think it has fully caught on yet. At least that is the reason I haven't fully switched over (although I am planning to). That is something I hope newtek definitely improves on in the near future. Also, lscript (at least for me anyways) is 1000x faster to write than a python equivalent script for most basic tasks. Regardless, glad to see the script helps the community.

-chris

jeric_synergy
07-15-2012, 09:32 PM
If the python resources exist, they certainly haven't been made easy to find.

And if NewTek thinks they are;

here's two users who beg to differ.
ipso facto, NewTek is sadly mistaken.

BeeVee
07-16-2012, 02:10 AM
I shall make sure it's clear in the docs that all the NewTek-supplied Python scripts installed with LightWave are unencrypted and can be easily torn apart for reference. There are 28 Python scripts in the LightWave\support\plugins\scripts\Python folder, along with their compiled versions.

B

jwiede
07-16-2012, 04:56 AM
I shall make sure it's clear in the docs that all the NewTek-supplied Python scripts installed with LightWave are unencrypted and can be easily torn apart for reference. There are 28 Python scripts in the LightWave\support\plugins\scripts\Python folder, along with their compiled versions.
What ETA is there for some kind of comprehensive reference docs on the Python APIs / classes / methods / etc. exposed by LW? Examples can help understanding of how the "pieces fit together", but aren't so great at describing the "available pieces" themselves (or their capabilities).