[Bf-committers] Feature request - "Copy Render Layer"

Bartek Skorupa (priv) bartekskorupa at bartekskorupa.com
Mon Feb 4 15:53:07 CET 2013


Managed to make it work.

Currently we have 4 buttons available:
"Duplicate": Duplicates selected render layer
"Copy": Copies selected render layer to clipboard
"Copy All": Copies all render layers of active scene to clipboard
"Paste": Pastes render layers from clipboard to active scene.

It works across scenes in the same file as well as between files.
If you want to Copy/Paste render layers between files do this:
"Copy" or :Copy All", then open the destination file and hit "Paste"

All of the render layers will be pasted to current scene of opened file.

If any of copied render layers had "material override" or "light override" and such material or light group doesn't exist in destination file - it simply won't be pasted and warning in info panel will appear.

Link to wiki and download:
http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Render/Copy_Render_Layer

Tracker:
http://projects.blender.org/tracker/index.php?func=detail&aid=34109&group_id=153&atid=467

Cheers

Bartek Skorupa

www.bartekskorupa.com

On 2 lut 2013, at 23:18, Bartek Skorupa (priv) <bartekskorupa at bartekskorupa.com> wrote:

> I don't know, but I am working on it just now.
> Up till now I managed to copy/paste render layers between scenes in the same file.
> I also managed to paste render layer to different file, but without layers and mask layers.
> I have problems with those attributes as they are stored in the buffer together with reference to original scene etc. When I open another file - those data are no longer available, so it does't want to work.
> 
> I will first try to make my solution work and if I succeed - I'll try to combine this with Bassam's script.
> 
> 
> Bartek Skorupa
> 
> www.bartekskorupa.com
> 
> On 2 lut 2013, at 22:43, PabloVazquez.org <venomgfx at gmail.com> wrote:
> 
>> @Bartek
>> 
>> Yes that'd be a nice addition, but I think both options should be provided.
>> 
>> Your approach seems good when copying a couple layers, but sometimes is
>> needed to copy many (characters, bg, fg, zmasks, and so on).
>> 
>> I think the best way would be to:
>> - Copy/Paste individual RenderLayer to buffer.
>> - Import RenderLayers from X scene
>> - Import RenderLayers from file...
>>   - This could be a little popup invoke that lets you browse to the file,
>> once the file is chosen it will the scenes in a dropdown, for each scene a
>> list of the renderlayers to import.
>> 
>> Is this even possible with current Blender's API?
>> 
>> 
>> 
>> --
>> Pablo Vazquez
>> CG Artist - Blender Foundation Certified Trainer
>> Twitter: http://twitter.com/venomgfx
>> Blender Network: http://blendernetwork.org/member/pablo-vazquez
>> E-mail: contact at pablovazquez.org
>> Website: http://www.pablovazquez.org
>> 
>> 
>> On Sat, Feb 2, 2013 at 8:10 AM, Bartek Skorupa (priv) <
>> bartekskorupa at bartekskorupa.com> wrote:
>> 
>>> @Pablo
>>> You're right. It should be called "Duplicate Render Layer". I didn't think
>>> about it this way. I'll change it.
>>> I'll also try to figure out a way to "Copy/Paste" render layers between
>>> scenes or files. My goal here would be to make it work the same as when we
>>> copy/paste nodes.
>>> Desired behavior would be like this:
>>> 
>>> Select render layer, then click COPY, open another scene or another file
>>> and hit PASTE.
>>> What do you think about it?
>>> 
>>> I think this kind of behavior would be easier to handle by users than
>>> "appending" render layers as it is in "Import Render Layers" add-on.
>>> You don't always know all render layers by heard, so probably anyway
>>> before running "Imposrt Render Layers" you'd want to open the source file,
>>> right? Just to be sure if you import what you want.
>>> 
>>> Cheers
>>> 
>>> Bartek Skorupa
>>> 
>>> www.bartekskorupa.com
>>> 
>>> On 1 lut 2013, at 23:53, PabloVazquez.org <venomgfx at gmail.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Great script Bartek! Although I think the name should be "Duplicate
>>>> RenderLayer" instead. "Copy" gives me the feeling it would copy it to the
>>>> buffer for later paste, like materials/textures menu does (which would be
>>>> great indeed!)
>>>> 
>>>> About copying renderlayers between files/scenes, I've been waiting for
>>> this
>>>> since always. But I always forget to poke the devs about it.
>>>> 
>>>> Now, working on Tube, I needed it a lot. Bassam was kind enough to make a
>>>> quick addon for this.
>>>> 
>>>> Import RenderLayers Addon:
>>>> http://www.pasteall.org/39351
>>>> 
>>>> Incredibly useful, it lets you append RenderLayers from another file.
>>>> 
>>>> The only limitation right now due to the lack of time, is that right now
>>> it
>>>> only imports the renderlayers from the first scene, it should let you
>>>> choose from which scene to append the renderlayers from. Any awesome
>>> python
>>>> hacker to jump in and help?
>>>> 
>>>> Once we have that, I believe this addon should be included in Blender
>>>> trunk, perhaps even enabled by default.
>>>> 
>>>> Cheers!
>>>> 
>>>> --
>>>> Pablo Vazquez
>>>> CG Artist - Blender Foundation Certified Trainer
>>>> Twitter: http://twitter.com/venomgfx
>>>> Blender Network: http://blendernetwork.org/member/pablo-vazquez
>>>> E-mail: contact at pablovazquez.org
>>>> Website: http://www.pablovazquez.org
>>>> 
>>>> 
>>>> On Fri, Feb 1, 2013 at 5:31 PM, Juan Pablo Bouza <jpbouza at hotmail.com
>>>> wrote:
>>>> 
>>>>> 
>>>>> Hi!!
>>>>> 
>>>>> Moreover, I think that there should be an option to copy a render layer
>>>>> from one scene to another one....
>>>>> 
>>>>> In many cases you need to do exact copies of render layers throughout
>>> many
>>>>> scenes. Currently the only way to do this is to create an empty scene
>>> with
>>>>> the render layer settinga, and then you have to start appending the
>>> objects
>>>>> from the animation scene.
>>>>> 
>>>>> 
>>>>> 
>>>>>> From: bartekskorupa at bartekskorupa.com
>>>>>> Date: Fri, 1 Feb 2013 23:15:23 +0100
>>>>>> To: bf-committers at blender.org
>>>>>> Subject: [Bf-committers] Feature request - "Copy Render Layer"
>>>>>> 
>>>>>> I am missing a little feature that shouldn't be very hard to implement,
>>>>> especially that I was able to create a simple add on that does exactly
>>> what
>>>>> I am looking for.
>>>>>> When creating render layers we have the option to add new render layer,
>>>>> remove render layer, but what is missing is the ability to make the
>>> exact
>>>>> copy of existing render layer.
>>>>>> It would help in many cases, like when you want to add new render layer
>>>>> where you'd like to change just one setting comparing to the render
>>> layer
>>>>> that already exists.
>>>>>> 
>>>>>> As I mentioned at the beginning I created a simple add on that does it.
>>>>> It adds a button in the render layers panel. The button executes the
>>>>> operator that creates exact copy of selected render layer.
>>>>>> I could simply ask for including this add on to blender, but I think
>>>>> such feature shouldn't be implemented via add-on, but on a "higher
>>> level".
>>>>> What do you think?
>>>>>> 
>>>>>> Here's the code:
>>>>>> http://www.pasteall.org/39349
>>>>>> 
>>>>>> 
>>>>>> http://cg.bartekskorupa.com/copy-render-layer/
>>>>>> 
>>>>>> 
>>>>>> Cheers
>>>>>> 
>>>>>> Bartek Skorupa
>>>>>> 
>>>>>> www.bartekskorupa.com
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Bf-committers mailing list
>>>>>> Bf-committers at blender.org
>>>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>>> 
>>>>> _______________________________________________
>>>>> Bf-committers mailing list
>>>>> Bf-committers at blender.org
>>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>>> 
>>>> _______________________________________________
>>>> Bf-committers mailing list
>>>> Bf-committers at blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>> 
>>> _______________________________________________
>>> Bf-committers mailing list
>>> Bf-committers at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>> 
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



More information about the Bf-committers mailing list