[Bf-cycles] Cycles standalone repository

Sergey Sharybin sergey.vfx at gmail.com
Mon Nov 17 11:11:36 CET 2014


I don't see huge issue with bi-directional sync actually apart from finding
which commits are to be copied over.

Now, it's easy to apply patch form blender onto cycles repository for as
long changes are only made to cycles core. In this case you can do
something like:

- in blender folder: git format-patch -1
90f3102f9c3ee8f6360d24e6ed47f4e9d028c976
  this would create a patch file for the specified commit, in this example
it'll be 0001-Cycles-Standalone-Updates-for-Volume-sampling.patch
- in cycles folder: git am -3 -p 3 --directory src
0001-Cycles-Standalone-Updates-for-Volume-sampling.patch
  well, it's really obvious isn't it :) here's a bit of explanation what
happens:

`git am` applies a series of patches generated with format-patch as a
commits
`-3` means fallback to a 3-way merge. Don't really want to go into details
about what exactly it means, but roughly speaking if the patch fails to
apply cleanly smarter patch merge algorithm is being used then
`-p 3` equal to argument in patch command, it omits 3 top directories level
in the file paths in the patch (in this case it'll mean a/intern/cycles
will be stripped from the paths in the patch)
`-- directory src` prepends "src/" to the paths in the files from the patch
(which makes paths looking like a/src/app/cycles_xml in the example above).

The same trick would be possible to apply patches from cycles to blender,
would just be something like `-p 2 --directory intern/cycles`.

After commit you might also want to amend the commit message, i.e. to avoid
having "Cycles: " prefix in patch subject when committing stuff to cycles
repository.

And one more thing, if the patch touches several areas (i.e. changes
inter/cycles and source/blender) you can simply edit the patch file and
drop changes in there which touches files outside of the cycles core.

Tonight was working in a py script to scan both repositories and detect all
the commits automatically and cross-commit them to both repos if they don't
have those changes. Didn't really finish it yet but will publish it as soon
as it's done.



On Mon, Nov 17, 2014 at 12:07 AM, Thomas Dinges <blender at dingto.org> wrote:

>  Hey,
> just tested the repo on Windows, CMake configuration and build was running
> fine out of the box. Great work!
>
> I would be interested to know, how we handle the syncing. Shall all
> commits still go to main Blender Cycles, and then ported (how?) to the
> standalone repo?
> What about changes, that only affect the standalone code, if I change
> something there and test with the standalone repo?
>
> Although I think we should stick to a one way direction (Blender Repo ->
> Cycles Repo).
>
> Best regards,
> Thomas
>
> Am 15.11.2014 um 16:54 schrieb Sergey Sharybin:
>
> Hi,
>
>  Last few evenings i've been working on making a dedicated repository for
> Cycles renderer and at this point it seems to be ready for public access
> now, even though some more work is required.
>
>  = Motivation =
>
>  Main motivation of creating standalone repository for Cycles is to
> simplify access for new developers who wants to hack into Cycles code but
> don't want to bother cloning the whole Blender repository and setting up
> environment for blender compilation.
>
>  It was kind of possible to only compile Cycles from Blender repository
> as well, but that process was really tedious.
>
>  = What repository contains =
>
>  Repository contains the full history of Cycles, starting from the
> original commit to the Blender SVN. This means it's possible to track down
> every change in the sources. The only thing here is that it's not possible
> to compile old sources. This is because build system for standalone
> repository was added just now and trying to put it somewhere in the past
> was rather tricky.
>
>  Sources are mainly a direct dump from Blender, so it shouldn't be
> difficult to keep Cycles in Blender and standalone repositories in sync.
> There are a bit of changes to build system which we'll need to backport to
> blender (namely CMake variables name convention).
>
>  Repository contains README file which describes how to compile Cycles.
> Compilation is so called "works for me", so more tweaks are likely needed
> before compilation becomes flawless for everyone.
>
>  *NOTE*: Windows is not supported atm! It's because of some dependencies
> which are not so clear to get. Mainly OpenGL, GLUT and GLEW. Don't worry,
> we will support Windows eventually, we just need to start from something!
>
>  The repository also contains folder with .xml examples, so it's really
> easy to test render engine just after compilation.
>
>  = Build system =
>
>  Currently CMake is used as a build system, and likely it'll be it,
>
>  = Where the repository is =
>
>  It is on our server, read-only access is
>
>    git clone git://git.blender.org/cycles.git
>
>  for write access (needs SSH key and you need to be a developer of the
> project)
>
>    git clone git at git.blender.org:cycles.git
>
>  To browse repository online please visit:
>
>    https://developer.blender.org/diffusion/C/
>
>  = Authors =
>
>  The repository contains the file with everyone who contributed to
> Cycles. This is somewhat common for all open source projects to have such a
> file.
>
>  Currently this file contains authors of commits, so if someone submitted
> patch which was committed by someone else please let me know -- that'd be
> easier than reading all the commit messages searching for such information.
>
>  = Synchronization with Blender =
>
>  Ideally we'll need to have some automated way to sync changes between
> Blender and Cycles, but it is not done yet. Exact way how to keep things in
> sync i'll publish later.
>
>  For now we can do manual synchronization, which is not THAT bad.
>
>  = Known TODOs =
>
>  - Windows build is not supported at this moment.
> - Logging option is exposed as an option but wouldn't work now.
> - Installation target is not tested and would need more work.
> - Compiled .oso files are not put to the final location, so manual copy is
> required for now.
>  - Set up mailing list for commits (if we need one?)
>
>  I'm pretty much sure i forgot to put some information in this email
> which i wanted, but the mail becomes too long already, so i'd rather wrap
> up now and answer the questions as they arrive.
>
>  --
>  With best regards, Sergey Sharybin
>
>
> _______________________________________________
> Bf-cycles mailing listBf-cycles at blender.orghttp://lists.blender.org/mailman/listinfo/bf-cycles
>
>
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>


-- 
With best regards, Sergey Sharybin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20141117/90d02212/attachment.htm 


More information about the Bf-cycles mailing list