Generated Objects Not Scaling
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/09/2003 at 19:50, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;---------
I'm probably asking the obvious here, but I really haven't been able to find the answers to any of this...What do I have to do to get generated objects to scale using the "Scale Active Element" tool? Translate and Rotate work fine, but Scale, no... The following code generates an object that won't scale.
BaseObject* FileAnim::GetVirtualObjects(PluginObject* op, HierarchyHelp* hh) { bool dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA); if (!dirty) return op->GetCache(hh); return BaseObject::Alloc(Ocube); }
And while I'm here:
- how important is it to report on generated object dimensions (ie by overriding the GetDimension() virtual)?
- how does one query the dimensions of an object or collection of objects? (ie, I've just loaded a file using LoadDocument, how do I find out how big what I've loaded is so I can report it in GetDimension()?)Oh, and ONE LAST THING:
The documentation for BaseObject::CheckCache() says:
"Return TRUE if the cache is valid."
Which is what you'd expect from the method name, however, all the example code says the reverse:
"dirty = op->CheckCache(hh)"
I'm assuming the documentation is wrong?Thanks.
.angus.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/09/2003 at 00:39, xxxxxxxx wrote:
C4D looks for metric description values in generators and scales those linearly. This is why for example the cube can only be scale uniformly.
I don't think there's a direct way to find the bounding box for an entire scene. GetDimension() isn't required, but without it your object won't have a bounding box.
Yeah, I think that is wrong in the docs. I'll change it for 8.2. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/09/2003 at 22:54, xxxxxxxx wrote:
how important is it to report on generated object dimensions (ie by >overriding the GetDimension() virtual)?
very important.
if you dont override these, youll get problems showing the objects in the generator. i.e. they will be culled when they are a bit out of view.
use MinMax to find the size of point based object if you build them yourself
if they are imported objects , use GetRad ,GetMp . For multiple objects add them together to get sum of all objects then pass back via GetDimension. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/09/2003 at 18:50, xxxxxxxx wrote:
> C4D looks for metric description values in generators and scales those linearly
Thanks Mikael
As my "generator" has no natural linear measurement to scale, I've put in a hidden size vector linked to a visible scaling vector, then apply SetScale() to the root of the loaded objects, which works fine.
> if they are imported objects use GetRad, GetMp
Thanks Paul!
It's amazing what you don't see when you're not sure where to look.
Precisely what I was looking for, right in front of my nose.> very important.
Although I wonder how true this is, as the native "Array" generator doesn't seem to return a bbox. (At least, I can't *see* a bbox when I select one.) Anyway, it's easy enough to generate one now that I know how, so the question's academic as far as I'm concerned
.angus.