Rename xref problem
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 09:04, xxxxxxxx wrote:
Hello all. I've just got a little question that I haven't found a solution for. I've finally gotten the go ahead to update my c4d r12 to R14! So I wrote a simple little script to replace existing old style xref's with the new one.
My problem is that when I copy the old path/filename and paste it into the new xref, nothing happens:
newXref[c4d.ID_CA_XREF_FILE] = oldXrefPathNameWhat am I missing?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 13:56, xxxxxxxx wrote:
To the best of my knowledge, the file path can only be edited when
the xref object is in Generator mode (like the Legacy xref object).
At least I don't know a way to over ride it in "new" mode but I'm
also interested in a possible solution.Cheers
Lennart -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 15:47, xxxxxxxx wrote:
Here's how I did it for one project the old way:
for ListOb in Selected: gData = ListOb.GetData() bc = c4d.BaseContainer() xrefPathName = gData.GetFilename( c4d.SCENEINSTANCE_FILENAME , "None" ) ...... # To change the path and file name: for root, subFolders, files in os.walk(rootdir) : for file in files: ListOb[c4d.SCENEINSTANCE_FILENAME] = os.path.join(root,file)
I'm sorry Lennart, but I'm not sure what you mean by 'Generator Mode'. You mean 'Object' mode?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 16:24, xxxxxxxx wrote:
No, when the (new R14) xref are created it's not in "Generator" mode.
You have the option to set it to Generator mode by the, wait here it comes.... Generator ButtonAnd its only in Generator mode ( a similar mode as the old Legacy Xref objects)
that I'm (and you) are able to change the file referenced.Cheers
Lennart -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 16:39, xxxxxxxx wrote:
I guess this means that it's necessary for the code to merge in a new xref that already has any referenced object in it in Generator mode, turn off Generator mode and edit it from there. A bit of a work around but it's fine for me. Thanks!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 16:43, xxxxxxxx wrote:
That might be a good idea, haven't tried.
My fear thou, is that it could potentially be an *illegal' operation
as objects then are shuffled in and out of the active document at runtime.
(Just a guess) -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 16:46, xxxxxxxx wrote:
Personally I've written my own xref object as I then know what is happening at runtime
and as the new xref have some "evolving" functions over a few versions of Cinema .... -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2012 at 17:11, xxxxxxxx wrote:
That sounds like a good idea ...if you have the expertise like you do. I'm just a few months into this python stuff, so it may take a bit of work. My co-workers just informed me that their tests with R14 new xref's are problematic. Apparently they don't work well with deeply nested xrefs and other isssues. Also i'm finding out that we can't use a custom xref to work with outside contractors...but that wont stop me from playing with my own code.